mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 15:24:07 +00:00
CI: Fix Flatpak releases
Add a job where the tag is checked if it is valid, it also checks if the release should be published to Flathub beta and/or Flathub by dynamically setting the matrix.
This commit is contained in:
parent
bbeafeabdd
commit
49c20c6cc1
29
.github/workflows/flatpak.yml
vendored
29
.github/workflows/flatpak.yml
vendored
|
@ -18,10 +18,35 @@ env:
|
||||||
YOUTUBE_SECRET_HASH: ${{ secrets.YOUTUBE_SECRET_HASH }}
|
YOUTUBE_SECRET_HASH: ${{ secrets.YOUTUBE_SECRET_HASH }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check_tag:
|
||||||
|
name: Check release tag
|
||||||
|
runs-on: [ubuntu-latest]
|
||||||
|
outputs:
|
||||||
|
valid_tag: ${{ steps.check_tag.outputs.valid_tag }}
|
||||||
|
matrix: ${{ steps.check_tag.outputs.matrix }}
|
||||||
|
steps:
|
||||||
|
- name: Check the tag
|
||||||
|
id: check_tag
|
||||||
|
run: |
|
||||||
|
shopt -s extglob
|
||||||
|
|
||||||
|
case ${GITHUB_REF##*/} in
|
||||||
|
+([0-9]).+([0-9]).+([0-9]) )
|
||||||
|
echo '::set-output name=valid_tag::${{ toJSON(true) }}'
|
||||||
|
echo '::set-output name=matrix::["beta", "stable"]'
|
||||||
|
;;
|
||||||
|
+([0-9]).+([0-9]).+([0-9])-@(beta|rc) )
|
||||||
|
echo '::set-output name=valid_tag::${{ toJSON(true) }}'
|
||||||
|
echo '::set-output name=matrix::["beta"]'
|
||||||
|
;;
|
||||||
|
* ) echo '::set-output name=valid_tag::${{ toJSON(false) }}' ;;
|
||||||
|
esac
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: Publish to Flathub
|
name: Publish to Flathub
|
||||||
runs-on: [ubuntu-latest]
|
runs-on: [ubuntu-latest]
|
||||||
if: "${{ github.event_name == 'release' && ( matrix.branch != 'stable' || (!contains(github.ref, '-beta') && !contains(github.ref, '-rc')) ) }}"
|
needs: check_tag
|
||||||
|
if: fromJSON(needs.check_tag.outputs.valid_tag)
|
||||||
env:
|
env:
|
||||||
FLATPAK_BUILD_PATH: flatpak_app/files/share
|
FLATPAK_BUILD_PATH: flatpak_app/files/share
|
||||||
container:
|
container:
|
||||||
|
@ -29,7 +54,7 @@ jobs:
|
||||||
options: --privileged
|
options: --privileged
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
branch: [stable, beta]
|
branch: ${{ fromJSON(needs.check_tag.outputs.matrix) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
Loading…
Reference in a new issue