rssguard/.github/workflows/rssguard.yml

120 lines
3.7 KiB
YAML
Raw Normal View History

2020-12-08 10:43:39 +01:00
---
name: rssguard
on:
push:
2023-08-17 07:36:53 +02:00
branches: ["*"]
2021-01-05 14:49:53 +01:00
tags: ["*"]
2020-12-08 10:43:39 +01:00
2024-05-29 09:13:03 +02:00
env:
ACTIONS_RUNNER_DEBUG: true
ACTIONS_STEP_DEBUG: true
2020-12-08 10:43:39 +01:00
jobs:
check-build-script:
2022-12-08 14:06:45 +01:00
name: check-build-script
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Check script syntax
run: bash -n ./resources/scripts/github-actions/build-linux-mac.sh
- name: Show shellcheck version
run: shellcheck --version
- name: Run shellcheck
run: shellcheck --color=always ./resources/scripts/github-actions/build-linux-mac.sh
2020-12-08 10:43:39 +01:00
build-rssguard:
needs: check-build-script
name: "${{ matrix.os }}; no-lite = ${{ matrix.no_lite }}; qt5 = ${{ matrix.use_qt5 }}"
2020-12-08 10:43:39 +01:00
runs-on: "${{ matrix.os }}"
strategy:
matrix:
2024-06-20 07:38:12 +02:00
os: [windows-2022, ubuntu-20.04, macos-13]
no_lite: ["ON", "OFF"]
use_qt5: ["ON", "OFF"]
2020-12-08 10:43:39 +01:00
include:
2024-06-20 07:24:23 +02:00
- os: windows-2022
2020-12-08 10:43:39 +01:00
script_name: .\resources\scripts\github-actions\build-windows.ps1
2023-04-05 07:57:25 +02:00
- os: ubuntu-20.04
2020-12-08 10:45:02 +01:00
script_name: ./resources/scripts/github-actions/build-linux-mac.sh
2024-06-20 07:38:12 +02:00
- os: macos-13
2020-12-08 10:45:02 +01:00
script_name: ./resources/scripts/github-actions/build-linux-mac.sh
exclude:
2023-04-05 07:57:25 +02:00
- os: ubuntu-20.04
2022-12-03 18:47:54 +01:00
use_qt5: "OFF"
2024-06-20 07:38:12 +02:00
- os: macos-13
use_qt5: "ON"
2021-06-20 11:12:49 +02:00
steps:
- name: Checkout source code
uses: actions/checkout@v4
2021-06-20 11:12:49 +02:00
with:
fetch-depth: 0
submodules: true
2021-06-21 07:26:18 +02:00
- name: Prepare environment and compile application
run: ${{ matrix.script_name }} "${{ matrix.os }}" "${{ matrix.no_lite }}" "${{ matrix.use_qt5 }}"
2021-06-21 07:26:18 +02:00
env:
GMAIL_CLIENT_ID: ${{ secrets.GMAIL_CLIENT_ID }}
GMAIL_CLIENT_SECRET: ${{ secrets.GMAIL_CLIENT_SECRET }}
FEEDLY_CLIENT_ID: ${{ secrets.FEEDLY_CLIENT_ID }}
FEEDLY_CLIENT_SECRET: ${{ secrets.FEEDLY_CLIENT_SECRET }}
2024-07-26 06:59:17 +02:00
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2021-06-19 17:19:32 +02:00
- name: Upload binaries
uses: actions/upload-artifact@v4
2020-12-08 14:34:46 +01:00
with:
if-no-files-found: error
name: RSS_Guard-${{ runner.os }}${{ matrix.no_lite == 'ON' && '-' || '-nowebengine-' }}Qt${{ matrix.use_qt5 == 'ON' && '5' || '6' }}
path: |
2022-11-22 09:34:44 +01:00
./rssguard-build/rssguard-*win*.exe
./rssguard-build/rssguard-*win*.7z
2022-01-31 09:11:48 +01:00
./rssguard-build/rssguard-*mac64.dmg
./rssguard-build/rssguard-*linux64.AppImage
2023-06-12 13:10:51 +02:00
dist-binaries:
name: distribute-binaries
needs:
- build-rssguard
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- name: Download binaries from previous jobs
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Release development binaries
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
2024-05-29 14:16:50 +02:00
artifactErrorsFailBuild: true
artifacts: artifacts/*/*
name: Development builds
omitBodyDuringUpdate: true
prerelease: true
removeArtifacts: true
tag: devbuild
- name: Update "devbuild" tag
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: richardsimko/update-tag@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: devbuild
- name: Release stable binaries
if: startsWith(github.ref, 'refs/tags/')
uses: ncipollo/release-action@v1
with:
2024-05-29 14:16:50 +02:00
artifactErrorsFailBuild: true
artifacts: artifacts/*/*
draft: true