| 1 | --- |
| 2 | name: rssguard |
| 3 | |
| 4 | on: |
| 5 | push: |
| 6 | branches: ["*"] |
| 7 | tags: ["*"] |
| 8 | |
| 9 | env: |
| 10 | ACTIONS_RUNNER_DEBUG: true |
| 11 | ACTIONS_STEP_DEBUG: true |
| 12 | |
| 13 | jobs: |
| 14 | check-build-script: |
| 15 | name: check-build-script |
| 16 | runs-on: ubuntu-latest |
| 17 | steps: |
| 18 | - name: Checkout source code |
| 19 | uses: actions/checkout@v4 |
| 20 | |
| 21 | - name: Check script syntax |
| 22 | run: bash -n ./resources/scripts/github-actions/build-linux-mac.sh |
| 23 | |
| 24 | - name: Show shellcheck version |
| 25 | run: shellcheck --version |
| 26 | |
| 27 | - name: Run shellcheck |
| 28 | run: shellcheck --color=always ./resources/scripts/github-actions/build-linux-mac.sh |
| 29 | |
| 30 | build-rssguard: |
| 31 | needs: check-build-script |
| 32 | name: "${{ matrix.os }}; no-lite = ${{ matrix.no_lite }}; qt5 = ${{ matrix.use_qt5 }}" |
| 33 | runs-on: "${{ matrix.os }}" |
| 34 | strategy: |
| 35 | matrix: |
| 36 | os: [windows-2022, ubuntu-24.04, macos-13] |
| 37 | no_lite: ["ON", "OFF"] |
| 38 | use_qt5: ["ON", "OFF"] |
| 39 | include: |
| 40 | - os: windows-2022 |
| 41 | script_name: .\resources\scripts\github-actions\build-windows.ps1 |
| 42 | - os: ubuntu-24.04 |
| 43 | script_name: ./resources/scripts/github-actions/build-linux-mac.sh |
| 44 | - os: macos-13 |
| 45 | script_name: ./resources/scripts/github-actions/build-linux-mac.sh |
| 46 | exclude: |
| 47 | - os: ubuntu-24.04 |
| 48 | use_qt5: "ON" |
| 49 | - os: macos-13 |
| 50 | use_qt5: "ON" |
| 51 | steps: |
| 52 | - name: Checkout source code |
| 53 | uses: actions/checkout@v4 |
| 54 | with: |
| 55 | fetch-depth: 0 |
| 56 | submodules: true |
| 57 | |
| 58 | - name: Prepare environment and compile application |
| 59 | run: ${{ matrix.script_name }} "${{ matrix.os }}" "${{ matrix.no_lite }}" "${{ matrix.use_qt5 }}" |
| 60 | env: |
| 61 | FEEDLY_CLIENT_ID: ${{ secrets.FEEDLY_CLIENT_ID }} |
| 62 | FEEDLY_CLIENT_SECRET: ${{ secrets.FEEDLY_CLIENT_SECRET }} |
| 63 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 64 | |
| 65 | - name: Upload binaries |
| 66 | uses: actions/upload-artifact@v4 |
| 67 | with: |
| 68 | name: RSS_Guard-${{ runner.os }}${{ matrix.no_lite == 'ON' && '-' || '-nowebengine-' }}Qt${{ matrix.use_qt5 == 'ON' && '5' || '6' }} |
| 69 | path: | |
| 70 | ./rssguard-build/rssguard-*win*.exe |
| 71 | ./rssguard-build/rssguard-*win*.7z |
| 72 | ./rssguard-build/rssguard-*mac64.dmg |
| 73 | ./rssguard-build/rssguard-*linux64.AppImage |
| 74 | |
| 75 | dist-binaries: |
| 76 | name: distribute-binaries |
| 77 | needs: |
| 78 | - build-rssguard |
| 79 | runs-on: ubuntu-24.04 |
| 80 | permissions: |
| 81 | contents: write |
| 82 | |
| 83 | steps: |
| 84 | - name: Download binaries from previous jobs |
| 85 | uses: actions/download-artifact@v4 |
| 86 | with: |
| 87 | path: artifacts |
| 88 | |
| 89 | - name: Release development binaries |
| 90 | if: ${{ !startsWith(github.ref, 'refs/tags/') }} |
| 91 | uses: ncipollo/release-action@v1 |
| 92 | with: |
| 93 | allowUpdates: true |
| 94 | artifactErrorsFailBuild: true |
| 95 | artifacts: artifacts/*/* |
| 96 | name: Development builds |
| 97 | omitBodyDuringUpdate: true |
| 98 | prerelease: true |
| 99 | removeArtifacts: true |
| 100 | tag: devbuild |
| 101 | |
| 102 | - name: Update "devbuild" tag |
| 103 | if: ${{ !startsWith(github.ref, 'refs/tags/') }} |
| 104 | uses: richardsimko/update-tag@v1 |
| 105 | env: |
| 106 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 107 | with: |
| 108 | tag_name: devbuild |
| 109 | |
| 110 | - name: Release stable binaries |
| 111 | if: startsWith(github.ref, 'refs/tags/') |
| 112 | uses: ncipollo/release-action@v1 |
| 113 | with: |
| 114 | artifactErrorsFailBuild: true |
| 115 | artifacts: artifacts/*/* |
| 116 | draft: true |