2.8.0 #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CMake Build | |
on: | |
release: | |
types: [published] | |
push: | |
branches: | |
- 'release/**' | |
workflow_dispatch: | |
env: | |
BUILD_TYPE: Release | |
VERSION_NAME: ${{ github.event.release.tag_name }} | |
jobs: | |
linux: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: | | |
sudo apt-get install -y libarchive-dev wget ninja-build libxkbcommon0 libxcb-cursor0 | |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20220822-1/linuxdeploy-x86_64.AppImage | |
chmod +x linuxdeploy-x86_64.AppImage | |
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage | |
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage | |
sudo add-apt-repository universe | |
sudo apt install libfuse2 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: 6.6.1 | |
target: desktop | |
modules: qtimageformats | |
- name: Configure CMake | |
working-directory: ${{github.workspace}} | |
run: cmake -DCMAKE_BUILD_TYPE=Release . -G Ninja | |
- name: Build | |
working-directory: ${{github.workspace}} | |
run: ninja | |
- name: Install Deployment Tools | |
working-directory: ${{github.workspace}} | |
run: | | |
sudo apt-get install -y wget | |
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20220822-1/linuxdeploy-x86_64.AppImage | |
chmod +x linuxdeploy-x86_64.AppImage | |
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage | |
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage | |
- name: Deploy | |
working-directory: ${{github.workspace}} | |
run: | | |
./linuxdeploy-x86_64.AppImage --appdir=FortuneAvenue-x86_64 -e FortuneAvenue -d fortune-avenue.desktop -i AppIcon.png -p qt -o appimage | |
mv FortuneAvenue*.AppImage fortune-avenue-$VERSION_NAME-linux.AppImage | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ${{github.workspace}}/fortune-avenue-${{github.event.release.tag_name}}-linux.AppImage | |
macos: | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: brew install libarchive ninja yaml-cpp | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: 6.6.1 | |
target: desktop | |
modules: qtimageformats | |
- name: Configure CMake | |
working-directory: ${{github.workspace}} | |
run: cmake -DCMAKE_BUILD_TYPE=Release . -G Ninja | |
- name: Build | |
working-directory: ${{github.workspace}} | |
run: ninja | |
- name: Shut down XProtectBehaviorService, which interferes with macdeployqt | |
working-directory: ${{github.workspace}} | |
run: | | |
echo killing...; sudo pkill -9 XProtect >/dev/null || true; | |
echo waiting...; while pgrep XProtect; do sleep 3; done; | |
- name: Deploy | |
working-directory: ${{github.workspace}} | |
run: macdeployqt 'FortuneAvenue.app' -dmg | |
- name: Rename | |
working-directory: ${{github.workspace}} | |
run: mv 'FortuneAvenue.dmg' "fortune-avenue-$VERSION_NAME-macos.dmg" | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ${{github.workspace}}/fortune-avenue-${{github.event.release.tag_name}}-macos.dmg | |
windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: 6.6.1 | |
target: desktop | |
arch: win64_msvc2019_64 | |
modules: qtimageformats | |
- name: Install Ninja | |
uses: seanmiddleditch/gha-setup-ninja@master | |
- name: Setup VS Environment | |
uses: seanmiddleditch/gha-setup-vsdevenv@master | |
- name: Configure CMake | |
working-directory: ${{github.workspace}} | |
shell: bash | |
run: cmake -DCMAKE_BUILD_TYPE=Release . -G Ninja | |
- name: Build | |
working-directory: ${{github.workspace}} | |
run: ninja | |
- name: Rename | |
working-directory: ${{github.workspace}} | |
shell: bash | |
run: | | |
mkdir "fortune-avenue-$VERSION_NAME" | |
mv "FortuneAvenue.exe" "fortune-avenue-$VERSION_NAME/FortuneAvenue.exe" | |
- name: Deploy | |
working-directory: ${{github.workspace}} | |
shell: bash | |
run: windeployqt "fortune-avenue-$VERSION_NAME/FortuneAvenue.exe" | |
- name: Copy dlls | |
run: | | |
Copy-Item -Path "C:\Program Files\Git\mingw64\bin\libgcc_s_seh-1.dll" -Destination ${{github.workspace}}/fortune-avenue-$env:VERSION_NAME | |
Copy-Item -Path "C:\Program Files\Git\mingw64\bin\libstdc++-6.dll" -Destination ${{github.workspace}}/fortune-avenue-$env:VERSION_NAME | |
Copy-Item -Path "C:\Program Files\Git\mingw64\bin\libwinpthread-1.dll" -Destination ${{github.workspace}}/fortune-avenue-$env:VERSION_NAME | |
- name: Archive | |
uses: thedoctor0/zip-release@main | |
with: | |
type: 'zip' | |
directory: ${{github.workspace}} | |
filename: fortune-avenue-${{github.event.release.tag_name}}-windows.zip | |
path: ./fortune-avenue-${{github.event.release.tag_name}}/ | |
- name: Release | |
uses: svenstaro/upload-release-action@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{github.workspace}}\fortune-avenue-${{github.event.release.tag_name}}-windows.zip | |
tag: ${{ github.ref }} | |
overwrite: true |