mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-07 03:53:38 +00:00
CI: Publish releases on Flathub
Now that Flatpak has achieved full feature parity with non-Flatpak builds, it is time to publish it directly into Flathub. Add a new "publish" job to the Flatpak workflow that builds and publishes to Flathub Beta, and to Flathub (if the release tag doesn't contain '-rc').
This commit is contained in:
parent
e1e1a0de0f
commit
5acfa27c74
59
.github/workflows/flatpak.yml
vendored
59
.github/workflows/flatpak.yml
vendored
|
@ -9,6 +9,9 @@ on:
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore: ['**.md']
|
paths-ignore: ['**.md']
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
TWITCH_CLIENTID: ${{ secrets.TWITCH_CLIENT_ID }}
|
TWITCH_CLIENTID: ${{ secrets.TWITCH_CLIENT_ID }}
|
||||||
|
@ -24,6 +27,7 @@ jobs:
|
||||||
generate_bundle:
|
generate_bundle:
|
||||||
name: Generate Flatpak Bundle
|
name: Generate Flatpak Bundle
|
||||||
runs-on: [ubuntu-latest]
|
runs-on: [ubuntu-latest]
|
||||||
|
if: github.event_name != 'release'
|
||||||
container:
|
container:
|
||||||
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-21.08
|
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-21.08
|
||||||
options: --privileged
|
options: --privileged
|
||||||
|
@ -53,3 +57,58 @@ jobs:
|
||||||
bundle: obs-studio-${{ github.sha }}.flatpak
|
bundle: obs-studio-${{ github.sha }}.flatpak
|
||||||
manifest-path: CI/flatpak/com.obsproject.Studio.json
|
manifest-path: CI/flatpak/com.obsproject.Studio.json
|
||||||
cache-key: flatpak-builder-${{ github.sha }}
|
cache-key: flatpak-builder-${{ github.sha }}
|
||||||
|
|
||||||
|
publish:
|
||||||
|
name: Publish to Flathub
|
||||||
|
runs-on: [ubuntu-latest]
|
||||||
|
if: github.event_name == 'release'
|
||||||
|
env:
|
||||||
|
FLATPAK_BUILD_PATH: flatpak_app/files/share
|
||||||
|
container:
|
||||||
|
image: bilelmoussaoui/flatpak-github-actions:kde-5.15-21.08
|
||||||
|
options: --privileged
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2.3.3
|
||||||
|
with:
|
||||||
|
submodules: 'recursive'
|
||||||
|
|
||||||
|
- name: Build Flatpak Manifest
|
||||||
|
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@master
|
||||||
|
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
|
||||||
|
|
||||||
|
- name: Validate AppStream
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{ env.FLATPAK_BUILD_PATH }}
|
||||||
|
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 }}
|
||||||
|
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; }
|
||||||
|
|
||||||
|
- name: Commit screenshots to the OSTree repository
|
||||||
|
run: |
|
||||||
|
ostree commit --repo=repo --canonical-permissions --branch=screenshots/x86_64 flatpak_app/screenshots
|
||||||
|
|
||||||
|
- name: "Publish to Flathub Beta"
|
||||||
|
uses: bilelmoussaoui/flatpak-github-actions/flat-manager@v4
|
||||||
|
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, '-rc')"
|
||||||
|
with:
|
||||||
|
flat-manager-url: https://hub.flathub.org/
|
||||||
|
repository: stable
|
||||||
|
token: ${{ secrets.FLATHUB_TOKEN }}
|
||||||
|
|
Loading…
Reference in a new issue