1.0.0 #9
Workflow file for this run
This file contains hidden or 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
| name: Flatter (Deploy) | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| flatter: | |
| name: Flatter | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/adley-nastri/flatter/kde:6.5 | |
| options: --privileged | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Install node to Fedora (workaround for act) | |
| run: dnf install -y nodejs | |
| - name: Setup GPG | |
| if: ${{ github.event_name != 'pull_request' }} | |
| id: gpg | |
| uses: crazy-max/ghaction-import-gpg@v5 | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Clean flatpak output directories (for local runs) | |
| run: rm -rf flatpak/ | |
| - name: Build | |
| id: flatpak | |
| uses: andyholmes/flatter@main | |
| with: | |
| files: | | |
| io.github.juzzlin.Noteahead.yml | |
| gpg-sign: ${{ steps.gpg.outputs.fingerprint }} | |
| flatpak-builder-args: | | |
| --default-branch=${{ github.ref_name }} | |
| --skip-if-unchanged | |
| - name: Prepare flatpak output directories | |
| run: | | |
| mkdir -p flatpak/${{ github.ref_name }}/repo | |
| - name: Move Flatpak repo files to flatpak/${{ github.ref_name }}/repo | |
| run: | | |
| cp -r "${{ steps.flatpak.outputs.repository }}/." flatpak/${{ github.ref_name }}/repo/ | |
| - name: Generate .flatpakref file | |
| run: | | |
| app_id="io.github.juzzlin.Noteahead" | |
| app_name="${app_id##*.}" | |
| REPO_NAME="${GITHUB_REPOSITORY#*/}" | |
| url="https://${GITHUB_REPOSITORY_OWNER}.github.io/${REPO_NAME}/flatpak/${{ github.ref_name }}/repo" | |
| cat <<EOF > "flatpak/${{ github.ref_name }}/${app_id}.flatpakref" | |
| [Flatpak Ref] | |
| Title=${app_name} | |
| SuggestRemoteName=${app_name} | |
| Name=${app_id} | |
| Branch=${{ github.ref_name }} | |
| Url=${url} | |
| GPGKey=${{ secrets.GPG_PUBLIC_KEY_BASE64 }} | |
| RuntimeRepo=https://flathub.org/repo/flathub.flatpakrepo | |
| IsRuntime=false | |
| EOF | |
| - name: Deploy Flatpak repo and ref | |
| uses: JamesIves/github-pages-deploy-action@v4.7.3 | |
| with: | |
| folder: flatpak | |
| target-folder: flatpak | |
| branch: gh-pages | |
| clean: false |