Build flatpak packages #112
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: Build flatpak packages | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - { sdk: '5.15', image: 'wachii/fedora-flatpak-kde:5.15-24-08'} | |
| - { sdk: '5.12', image: 'wachii/fedora-flatpak-kde:5.12' } | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{matrix.config.image}} | |
| options: --privileged | |
| steps: | |
| - name: Checkout smplayer | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get version | |
| run: | | |
| git config --global --add safe.directory . | |
| ./get_version.sh | |
| VERSION=`cat version` | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Checkout flatpack files | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 'smplayer-dev/flatpak-builds' | |
| - name: Patch | |
| #if: ${{matrix.config.sdk == '5.15'}} | |
| if: ${{false}} | |
| working-directory: '5.15' | |
| run: sed -e 's/USE_SHM/USE_SHM DEFINES+=USE_GL_WINDOW/' -i info.smplayer.SMPlayer.yml | |
| - name: Build | |
| uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6 | |
| with: | |
| bundle: smplayer-${{env.VERSION}}-sdk${{matrix.config.sdk}}.flatpak | |
| manifest-path: ${{matrix.config.sdk}}/info.smplayer.SMPlayer.yml | |
| cache: true | |
| cache-key: smplayer-build-${{runner.os}}-${{matrix.config.sdk}} | |
| - name: Upload package to release | |
| if: github.event_name == 'release' | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ./smplayer-*.flatpak | |
| tag: ${{ github.ref }} | |
| overwrite: true | |
| file_glob: true |