Files
flutter/.github/workflows/build-linux.yml
dependabot[bot] 9fc0a68937 Bump actions/upload-artifact from 5 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 00:07:55 +00:00

86 lines
3.0 KiB
YAML

name: Build Linux
on:
workflow_call:
inputs:
ref:
required: true
type: string
secrets:
SSH_DEPLOY_KEY:
required: true
jobs:
# TODO: note that we currently only build for x64, as arm64 is not supported by
# subosito/flutter-action@v2 yet and we don't want to install flutter manually
# just for this workflow: https://github.com/subosito/flutter-action/issues/345
build_linux:
name: Build application - ${{ matrix.platform }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- platform: x64
runner: ubuntu-latest
# - platform: arm64
# runner: ubuntu-24.04-arm
steps:
- name: Checkout application
uses: actions/checkout@v6
with:
ref: ${{ inputs.ref }}
- name: Common setup
uses: ./.github/actions/flutter-common
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
- name: Build application for linux
run: |
sudo apt update
sudo apt install -y pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev --no-install-recommends
flutter build linux --release
tar -zcvf linux-${{ matrix.platform }}.tar.gz build/linux/${{ matrix.platform }}/release/bundle
- uses: actions/upload-artifact@v6
with:
name: builds-linux
path: |
linux-${{ matrix.platform }}.tar.gz
generate_flathub_manifest:
runs-on: ubuntu-latest
name: Update flathub manifest
# If the job fails just continue, this can be done manually later
continue-on-error: true
needs:
- build_linux
steps:
- name: Checkout flatpak-flathub repo
uses: actions/checkout@v6
with:
repository: wger-project/de.wger.flutter
- name: Bump version and update manifest
run: |
git clone https://github.com/TheAppgineer/flatpak-flutter.git --branch 0.7.5 ../flatpak-flutter
pip install -r ../flatpak-flutter/requirements.txt
python bump-wger-version.py ${{ inputs.ref }}
../flatpak-flutter/flatpak-flutter.py --app-module wger flatpak-flutter.json
# TODO: this is currently commented out because it seems the action used below
# doesn't work anymore. This is probably not all that surprising as it
# isn't being developed anymore. This should be update so that the process
# works automatically again, till then this can be done manually.
#- name: Push updated config to flathub repository
# uses: cpina/github-action-push-to-another-repository@main
# env:
# SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
# with:
# destination-github-username: wger-project
# destination-repository-name: de.wger.flutter
# user-email: github-actions@github.com
# target-branch: release-${{ inputs.ref }}
# create-target-branch-if-needed: true
# commit-message: Update to ${{ inputs.ref }}