LinuxReleaseFlatpak #5
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: LinuxReleaseFlatpak | |
| # Creates a Linux Installer using beeware-briefcase and github actions | |
| # Generates a Flatpak isntaller an Python 3.12 and Ubuntu 24.04 | |
| # Author: Rahul Singh | |
| # https://github.com/codecliff/PhotoGlimmer | |
| # Runs manually, will prompt for release tag | |
| on: | |
| #push: | |
| # branches: [ master ] | |
| #pull_request: | |
| # branches: [ master ] | |
| workflow_dispatch: | |
| inputs: #when run, ask user to input release tag | |
| reltag: | |
| description: "tag for release, eg v1.0.0_linux" | |
| required: true | |
| default: "latest" | |
| #trigger when a relaease tag is pushed . disable this later | |
| #push: | |
| # tags: | |
| # - 'v*' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| repository-projects: write | |
| jobs: | |
| build-flatpak: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| TAGNAME: ${{ inputs.reltag }} | |
| steps: | |
| - uses: actions/checkout@v2 #1 | |
| - uses: actions/setup-python@v3 #2 | |
| with: | |
| python-version: '3.12' | |
| - name: install dependencies #3 | |
| run: | | |
| sudo apt update | |
| sudo apt install -yq git build-essential pkg-config python3-dev python3-venv qt6-base-dev flatpak flatpak-builder | |
| sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo | |
| python -m pip install briefcase | |
| - name: Build linux arifacts #4 | |
| run: | | |
| briefcase build linux flatpak | |
| briefcase package linux flatpak #creates .flatpak file | |
| - uses: actions/upload-artifact@v4 #5 | |
| with: | |
| name: linuxartifacts | |
| path: "./dist/" | |
| - uses: marvinpinto/action-automatic-releases@latest # {{xyz}}varaibles not available in uses | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: "${{ inputs.reltag }}" # "v0.5.0Beta2" | |
| prerelease: false | |
| title: "Build ${{ github.event.inputs.reltag }}" #same as inputs.reltag | |
| files: | | |
| ./dist/*.flatpak | |