mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-28 17:08:29 +01:00
Bumps [o-murphy/flutpak](https://github.com/o-murphy/flutpak) from 0.8.8 to 0.9.0. - [Release notes](https://github.com/o-murphy/flutpak/releases) - [Changelog](https://github.com/o-murphy/flutpak/blob/main/CHANGELOG.md) - [Commits](https://github.com/o-murphy/flutpak/compare/v0.8.8...v0.9.0) --- updated-dependencies: - dependency-name: o-murphy/flutpak dependency-version: 0.9.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
131 lines
4.0 KiB
YAML
131 lines
4.0 KiB
YAML
name: Build Linux
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
ref:
|
|
description: 'Branch/Tag to build'
|
|
required: true
|
|
default: 'master'
|
|
generate_manifest:
|
|
description: 'Update flathub manifest'
|
|
type: boolean
|
|
default: false
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
required: true
|
|
type: string
|
|
generate_manifest:
|
|
type: boolean
|
|
default: true
|
|
secrets:
|
|
SSH_DEPLOY_KEY:
|
|
required: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
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 }}
|
|
outputs:
|
|
flutter_sdk_version: ${{ steps.flutter-version.outputs.flutter_sdk_version }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- platform: x64
|
|
runner: ubuntu-latest
|
|
# - platform: arm64
|
|
# runner: ubuntu-24.04-arm
|
|
steps:
|
|
- name: Checkout application
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
ref: ${{ inputs.ref }}
|
|
|
|
- name: Read Flutter SDK version
|
|
id: flutter-version
|
|
run: |
|
|
flutter_sdk_version=$(grep 'flutter-version:' .github/actions/flutter-common/action.yml | awk '{print $2}')
|
|
echo "flutter_sdk_version=$flutter_sdk_version" >> "$GITHUB_OUTPUT"
|
|
|
|
- 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 libsecret-1-dev libjsoncpp-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@v7
|
|
with:
|
|
name: builds-linux
|
|
path: |
|
|
linux-${{ matrix.platform }}.tar.gz
|
|
|
|
generate_flathub_manifest:
|
|
runs-on: ubuntu-latest
|
|
name: Update flathub manifest
|
|
if: ${{ inputs.generate_manifest }}
|
|
|
|
# If the job fails just continue, this can be done manually later
|
|
continue-on-error: true
|
|
|
|
needs:
|
|
- build_linux
|
|
|
|
steps:
|
|
- name: Checkout application
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
ref: ${{ inputs.ref }}
|
|
# flutpak resolves the tag to its commit
|
|
fetch-depth: 0
|
|
|
|
- name: Common setup
|
|
uses: ./.github/actions/flutter-common
|
|
|
|
- name: Setup flutpak
|
|
uses: o-murphy/flutpak/.github/actions/setup-flutpak@v0.9.0
|
|
|
|
- name: Generate manifest with flutpak
|
|
env:
|
|
REF: ${{ inputs.ref }}
|
|
FLUTTER_VERSION: ${{ needs.build_linux.outputs.flutter_sdk_version }}
|
|
run: flutpak generate --tag "$REF" --flutter "$FLUTTER_VERSION"
|
|
|
|
- name: Checkout flatpak-flathub repo
|
|
uses: actions/checkout@v7
|
|
with:
|
|
repository: wger-project/de.wger.flutter
|
|
ssh-key: ${{ secrets.SSH_DEPLOY_KEY }}
|
|
path: flathub
|
|
|
|
- name: Copy manifest to flathub repository
|
|
working-directory: flathub
|
|
run: |
|
|
# The SDK module carries the Flutter version in its name, don't keep old ones
|
|
rm -rf flutter-sdk-*.json patches
|
|
cp -r ../flatpak/generated/. .
|
|
|
|
- name: Push updated config to flathub repository
|
|
working-directory: flathub
|
|
env:
|
|
REF: ${{ inputs.ref }}
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git checkout -b "release-$REF"
|
|
git add -A
|
|
git commit -m "Update to $REF"
|
|
git push origin "release-$REF"
|