Build Flatpak and Publish Release #10
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: Build Flatpak and Publish Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: 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 | |
| uses: actions/checkout@v4 | |
| - name: Build Flatpak bundle | |
| uses: flatpak/flatpak-github-actions/flatpak-builder@v6 | |
| with: | |
| manifest-path: eu.samk0.WoTModAssistant.yaml | |
| bundle: WoTModAssistant.flatpak | |
| arch: x86_64 | |
| cache-key: flatpak-${{ github.sha }} | |
| - name: Upload bundle artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flatpak-bundle | |
| path: WoTModAssistant.flatpak | |
| release: | |
| name: Publish Release | |
| needs: build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download bundle | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: flatpak-bundle | |
| - name: Create Release and Upload Asset | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: WoTModAssistant ${{ github.ref_name }} | |
| files: WoTModAssistant.flatpak | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |