Skip to content

Commit

Permalink
flatpak: add deploy step for Flathub
Browse files Browse the repository at this point in the history
When commits are pushed to branch "flathub-release" an additional step
will be executed to deploy the Flatpak build to Flathub.

- requires secret FLATHUB_TOKEN to be added to GitHub configuration
- add act-cli files needed for "push" event testing to .gitignore
  • Loading branch information
stefanb2 committed Mar 2, 2024
1 parent 69b0342 commit 26f51a8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/build-flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
name: build-flatpak

on:
workflow_call:
workflow_call:

push:
branches:
- flathub-release

jobs:
build-linux:
Expand Down Expand Up @@ -48,3 +52,14 @@ jobs:
# skip step when running under act-cli
if: |
env.ACT != 'true'
- name: Deploy release to Flathub
uses: flatpak/flatpak-github-actions/flat-manager@v4
with:
repository: flathub
flat-manager-url: https://flathub.org
token: ${{ secrets.FLATHUB_TOKEN }}
verbose: true
# only execute step when pushing to "flathub-release" branch
if: |
github.ref == 'refs/heads/flathub-release'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# flatpak bundle copied out from act-cli container for testing
# flatpak --user install --bundle ./io.github.bkueng.qMasterPassword
/io.github.bkueng.qMasterPassword
/.event.json
/.secrets

*.log

Expand Down

0 comments on commit 26f51a8

Please sign in to comment.