Fix: Broken MainWindowUI image url #21
This file contains hidden or 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
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| name: Create Tag/Release and Build Deployment | |
| env: | |
| QT_VERSION: 5.15.2 | |
| NAME: XFakeContrib | |
| jobs: | |
| release: | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| release_created: ${{ steps.create_release.outputs.release_created }} | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Create Release | |
| id: create_release | |
| uses: xaprier/actions-semver@latest | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| draft: false | |
| prerelease: false | |
| include-letter-v: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| build-linux: | |
| needs: [release] | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| arch: [x86_64, aarch64] | |
| if: needs.release.outputs.release_created == 'true' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install dependencies for build | |
| run: | | |
| sudo add-apt-repository universe | |
| sudo apt-get update | |
| sudo apt-get install -y cmake libfuse2 qtbase5-dev libqt5svg5-dev qttools5-dev libgtest-dev libgmock-dev | |
| - name: Set up GCC Version 13 for C++20 | |
| run: | | |
| sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
| sudo apt-get update | |
| sudo apt-get install -y g++-13 | |
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 | |
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100 | |
| - name: Configure Project | |
| run: | | |
| cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr | |
| - name: Build Project | |
| run: | | |
| make -j`nproc` install DESTDIR=AppDir | |
| - name: Install LinuxDeployQt | |
| run: | | |
| wget -c -nv https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage -O linuxdeployqt.AppImage | |
| chmod +x linuxdeployqt.AppImage | |
| - name: Build AppImage | |
| run: | | |
| ./linuxdeployqt.AppImage AppDir/usr/share/applications/${{ env.NAME }}.desktop -bundle-non-qt-libs -appimage | |
| - name: Remove linuxdeployqt and rename AppImage | |
| run: | | |
| rm linuxdeployqt.AppImage | |
| APPIMAGE_FILE=$(ls | grep '\.AppImage$') | |
| mv $APPIMAGE_FILE ${{ env.NAME }}-${{ matrix.arch }}.AppImage | |
| - name: Upload Release Asset | |
| id: upload-release-asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ needs.release.outputs.upload_url }} | |
| asset_path: ./${{ env.NAME }}-${{ matrix.arch }}.AppImage | |
| asset_name: ${{ env.NAME }}-${{ matrix.arch }}.AppImage | |
| asset_content_type: application/octet-stream | |
| build-windows: | |
| needs: [release] | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - { sys: ucrt64, env: ucrt-x86_64 } | |
| if: needs.release.outputs.release_created == 'true' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: MSYS2 Setup | |
| uses: msys2/setup-msys2@v2 | |
| id: msys2 | |
| with: | |
| update: true | |
| msystem: ${{ matrix.sys }} | |
| install: | | |
| mingw-w64-${{ matrix.env }}-toolchain | |
| mingw-w64-${{ matrix.env }}-clang | |
| mingw-w64-${{ matrix.env }}-glew | |
| mingw-w64-${{ matrix.env }}-mesa | |
| mingw-w64-${{ matrix.env }}-angleproject | |
| mingw-w64-${{ matrix.env }}-qt5-base | |
| mingw-w64-${{ matrix.env }}-qt5-tools | |
| mingw-w64-${{ matrix.env }}-qt5-svg | |
| mingw-w64-${{ matrix.env }}-cmake | |
| mingw-w64-${{ matrix.env }}-make | |
| - name: Update PowerShell PATH | |
| run: | | |
| $msys2Path = "${{ steps.msys2.outputs.msys2-location }}\${{ matrix.sys }}\bin;${{ steps.msys2.outputs.msys2-location }}\usr\bin" | |
| [System.Environment]::SetEnvironmentVariable('PATH', "$env:PATH;$msys2Path", [System.EnvironmentVariableTarget]::User) | |
| shell: pwsh | |
| - name: Run deploy.ps1 script | |
| shell: pwsh | |
| run: | | |
| .\deploy.ps1 ${{ steps.msys2.outputs.msys2-location }}\${{ matrix.sys }}\bin | |
| env: | |
| QT_VERSION: 5.15.2 | |
| NAME: ${{ env.NAME }} | |
| MSYSTEM: ${{ matrix.sys }} | |
| CMAKE_PREFIX_PATH: ${{ steps.msys2.outputs.msys2-location }}\${{ matrix.sys }}\lib\cmake\Qt5 | |
| - name: Upload Release Asset | |
| id: upload-release-asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ needs.release.outputs.upload_url }} | |
| asset_path: ./build/install/Output/${{ env.NAME }}-x64-installer.exe | |
| asset_name: ${{ env.NAME }}-x64-installer.exe | |
| asset_content_type: application/x-msdownload |