mirror of
https://github.com/wger-project/flutter.git
synced 2026-02-18 00:17:48 +01:00
Move flathub workflow to build-linux.yml
This commit is contained in:
41
.github/workflows/build-linux.yml
vendored
41
.github/workflows/build-linux.yml
vendored
@@ -5,11 +5,14 @@ on:
|
||||
ref:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
SSH_DEPLOY_KEY:
|
||||
required: true
|
||||
jobs:
|
||||
|
||||
# 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
|
||||
# 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 }}
|
||||
@@ -29,7 +32,6 @@ jobs:
|
||||
- name: Common setup
|
||||
uses: ./.github/actions/flutter-common
|
||||
|
||||
# Compare with list of available packages on the runner:
|
||||
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
|
||||
- name: Build application for linux
|
||||
run: |
|
||||
@@ -37,9 +39,38 @@ jobs:
|
||||
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
|
||||
cp build/linux/${{ matrix.platform }}/release/bundle/wger build/linux/${{ matrix.platform }}/release/bundle/wger-linux-${{ matrix.platform }}
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: builds-linux
|
||||
path: |
|
||||
linux-${{ matrix.platform }}.tar.gz
|
||||
|
||||
generate_flathub_manifest:
|
||||
runs-on: ubuntu-latest
|
||||
name: Update flathub manifest
|
||||
needs:
|
||||
- build_linux
|
||||
steps:
|
||||
- name: Checkout application
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: wger-project/de.wger.flutter
|
||||
|
||||
- name: Bump version and update manifest
|
||||
run: |
|
||||
pip install pyyaml toml
|
||||
git clone https://github.com/TheAppgineer/flatpak-flutter.git --branch 0.6.0 ../flatpak-flutter
|
||||
python bump-wger-version.py ${{ inputs.ref }}
|
||||
../flatpak-flutter/flatpak-flutter.py --app-module wger flatpak-flutter.json
|
||||
|
||||
- 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 }}
|
||||
|
||||
4
.github/workflows/build-windows.yml
vendored
4
.github/workflows/build-windows.yml
vendored
@@ -6,6 +6,10 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
jobs:
|
||||
# TODO: note that we currently only upload the .exe file, which is not
|
||||
# sufficient for a proper Windows release. See the documentation
|
||||
# for what would be necessary (low priority, but nice to have):
|
||||
# https://docs.flutter.dev/platform-integration/windows/building
|
||||
build_windows:
|
||||
name: Windows
|
||||
runs-on: windows-latest
|
||||
|
||||
40
.github/workflows/make-release.yml
vendored
40
.github/workflows/make-release.yml
vendored
@@ -26,6 +26,8 @@ jobs:
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
ref: ${{ github.event.inputs.version }}
|
||||
secrets:
|
||||
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
|
||||
|
||||
build_android:
|
||||
name: Android
|
||||
@@ -140,45 +142,9 @@ jobs:
|
||||
files: |
|
||||
builds-aab/app-release.aab
|
||||
builds-apk/app-release.apk
|
||||
builds-linux/wger-linux-x86_64.tar.gz
|
||||
builds-linux/wger-linux-x86_64.sha256
|
||||
builds-linux/wger-linux-x86.tar.gz
|
||||
builds-ios/Runner.app
|
||||
builds-macos/wger.app
|
||||
builds-windows/wger.exe
|
||||
|
||||
generate_flathub_manifest:
|
||||
runs-on: ubuntu-latest
|
||||
name: Upload flathub manifest
|
||||
needs:
|
||||
- make_gh_release
|
||||
steps:
|
||||
- name: Checkout application
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.version }}
|
||||
|
||||
- name: Common flutter setup
|
||||
uses: ./.github/actions/flutter-common
|
||||
|
||||
- name: Generate manifest
|
||||
run: |
|
||||
cd flatpak/scripts
|
||||
dart pub get
|
||||
dart manifest_generator.dart --meta ../flatpak_meta.json --github
|
||||
mkdir ../../flathub
|
||||
cp flatpak_generator_exports/de.wger.flutter.json ../../flathub
|
||||
cp flatpak_generator_exports/flathub.json ../../flathub
|
||||
|
||||
- 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:
|
||||
source-directory: flathub
|
||||
destination-github-username: wger-project
|
||||
destination-repository-name: de.wger.flutter
|
||||
user-email: github-actions@github.com
|
||||
target-branch: release-${{ github.event.inputs.version }}
|
||||
create-target-branch-if-needed: true
|
||||
commit-message: Update to ${{ github.event.inputs.version }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user