release 1.5.1 #16
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: flatpak-ci | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| workflow_dispatch: | |
| inputs: | |
| publish_repo: | |
| description: 'Also publish an OSTree repo to gh-pages (may fail on large apps due to GitHub file size limits)' | |
| required: false | |
| default: 'false' | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| name: Build Flatpak | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48 | |
| options: --privileged | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build bundle with flatpak-builder | |
| id: build | |
| uses: flatpak/flatpak-github-actions/flatpak-builder@v6 | |
| with: | |
| manifest-path: linux/io.github.gcclinux.EasyEdit.yml | |
| build-bundle: true | |
| bundle: EasyEdit.flatpak | |
| cache-key: flatpak-24.08 | |
| - name: Upload bundle artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: EasyEdit.flatpak | |
| path: EasyEdit.flatpak | |
| - name: Validate AppStream (if present) | |
| run: | | |
| if command -v appstream-util >/dev/null 2>&1; then | |
| if ls build-dir/files/share/metainfo/*.xml 1> /dev/null 2>&1; then | |
| appstream-util validate-relax --nonet build-dir/files/share/metainfo/*.xml || true | |
| fi | |
| fi | |
| publish-repo: | |
| name: Export and publish OSTree repo (gh-pages) | |
| needs: build | |
| if: github.event_name == 'workflow_dispatch' && github.event.inputs.publish_repo == 'true' | |
| continue-on-error: true | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48 | |
| options: --privileged | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download bundle artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: EasyEdit.flatpak | |
| path: ./ | |
| - name: Create OSTree repo and import bundle | |
| run: | | |
| rm -rf repo | |
| mkdir -p repo | |
| ostree --repo=repo init --mode=archive-z2 | |
| flatpak build-import-bundle --no-update-summary repo EasyEdit.flatpak | |
| flatpak build-update-repo --static-deltas=false repo | |
| - name: Publish repo to gh-pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: repo | |
| destination_dir: flatpak-repo | |
| keep_files: true | |
| attach-release: | |
| name: Attach bundle to GitHub Release | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download bundle artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: EasyEdit.flatpak | |
| path: ./ | |
| - name: Upload release asset | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| EasyEdit.flatpak | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| validate-flathub: | |
| name: Build Flathub-ready manifest (validation) | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/flathub-infra/flatpak-github-actions:gnome-48 | |
| options: --privileged | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Build bundle with flatpak-builder (flathub variant) | |
| id: build_flathub | |
| uses: flatpak/flatpak-github-actions/flatpak-builder@v6 | |
| with: | |
| manifest-path: linux/io.github.gcclinux.EasyEdit-flathub.yml | |
| build-bundle: true | |
| bundle: EasyEdit-flathub.flatpak | |
| cache-key: flatpak-24.08-flathub | |
| # The skeleton may not fully build until TODOs are completed; allow failures on PRs if desired | |
| # verbose: true | |
| - name: Upload flathub bundle artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: EasyEdit-flathub.flatpak | |
| path: EasyEdit-flathub.flatpak |