forked from obsproject/obs-studio
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Split Flatpak beta and stable branches
We currently publish the same build from the same branch to Flathub. However, soon we'll need to build the Flatpak manifest in different branches, and publish them in different repositories. Prepare for that by splitting the publish step in two: one for Flathub, and another for Flathub Beta. Do that using a matrix strategy.
- Loading branch information
1 parent
c0c17d5
commit 3ca13f3
Showing
1 changed file
with
17 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,29 +67,44 @@ jobs: | |
container: | ||
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-21.08 | ||
options: --privileged | ||
strategy: | ||
matrix: | ||
branch: [stable, beta] | ||
steps: | ||
- name: Check if job should run | ||
id: should_run | ||
if: "${{ matrix.branch != 'stable' || (!contains(github.ref, '-beta') && !contains(github.ref, '-rc')) }}" | ||
run: | | ||
echo "Job should run" | ||
echo "::set-output name=should_run::yes" | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
if: steps.should_run.outputs.should_run == 'yes' | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Build Flatpak Manifest | ||
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@master | ||
if: steps.should_run.outputs.should_run == 'yes' | ||
with: | ||
bundle: obs-studio-${{ github.sha }}.flatpak | ||
manifest-path: CI/flatpak/com.obsproject.Studio.json | ||
cache-key: flatpak-builder-${{ github.sha }} | ||
mirror-screenshots-url: https://dl.flathub.org/repo/screenshots | ||
branch: ${{ matrix.branch }} | ||
|
||
- name: Validate AppStream | ||
shell: bash | ||
working-directory: ${{ env.FLATPAK_BUILD_PATH }} | ||
if: steps.should_run.outputs.should_run == 'yes' | ||
run: | | ||
appstream-util validate appdata/com.obsproject.Studio.appdata.xml | ||
- name: Verify icon and metadata in app-info | ||
shell: bash | ||
working-directory: ${{ env.FLATPAK_BUILD_PATH }} | ||
if: steps.should_run.outputs.should_run == 'yes' | ||
run: | | ||
test -f app-info/icons/flatpak/128x128/com.obsproject.Studio.png || { echo "Missing 128x128 icon in app-info" ; exit 1; } | ||
test -f app-info/xmls/com.obsproject.Studio.xml.gz || { echo "Missing com.obsproject.Studio.xml.gz in app-info" ; exit 1; } | ||
|
@@ -100,14 +115,15 @@ jobs: | |
- name: Publish to Flathub Beta | ||
uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v4 | ||
if: steps.should_run.outputs.should_run == 'yes' && matrix.branch == 'beta' | ||
with: | ||
flat-manager-url: https://hub.flathub.org/ | ||
repository: beta | ||
token: ${{ secrets.FLATHUB_BETA_TOKEN }} | ||
|
||
- name: Publish to Flathub | ||
uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v4 | ||
if: "!contains(github.ref, '-beta') && !contains(github.ref, '-rc')" | ||
if: steps.should_run.outputs.should_run == 'yes' && matrix.branch == 'stable' | ||
with: | ||
flat-manager-url: https://hub.flathub.org/ | ||
repository: stable | ||
|