Skip to content

Commit 92295c5

Browse files
committed
Merge branch 'master' into fix/timezone-problems
2 parents 70fba34 + e41b088 commit 92295c5

File tree

537 files changed

+10645
-4753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

537 files changed

+10645
-4753
lines changed

.github/actions/flutter-common/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ runs:
99
uses: subosito/flutter-action@v2
1010
with:
1111
channel: stable
12-
flutter-version: 3.29.3
12+
flutter-version: 3.32.8
1313
cache: true
1414

1515
- name: Install Flutter dependencies

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ If applicable, please link to any related issues (`Closes #123`,
1212

1313
- [ ] Tests for the changes have been added (for bug fixes / features)
1414
- [ ] Set a 100 character limit in your editor/IDE to avoid white space diffs in the PR
15-
(run `dart format --line-length=100 .`)
15+
(run `dart format .`)
1616
- [ ] Updated/added relevant documentation (doc comments with `///`).
1717
- [ ] Added relevant reviewers.

.github/workflows/build-android.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout application
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v5
2020
with:
2121
ref: ${{ inputs.ref }}
2222

@@ -46,7 +46,7 @@ jobs:
4646
runs-on: ubuntu-latest
4747
steps:
4848
- name: Checkout application
49-
uses: actions/checkout@v4
49+
uses: actions/checkout@v5
5050
with:
5151
ref: ${{ inputs.ref }}
5252

.github/workflows/build-apple.yml

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,76 @@ jobs:
1111
runs-on: macos-latest
1212
steps:
1313
- name: Checkout application
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v5
1515
with:
1616
ref: ${{ inputs.ref }}
1717

18+
# This seems to be related to https://github.com/actions/runner-images/issues/12758
19+
- name: Xcode setup
20+
run: |
21+
sudo xcode-select --switch /Applications/Xcode_16.4.app
22+
1823
- name: Common flutter setup
1924
uses: ./.github/actions/flutter-common
2025

2126
- name: Build .app
22-
run: flutter build ios --release --no-codesign
27+
run: |
28+
flutter build ios --release --no-codesign
29+
cd build/ios/iphoneos
30+
zip -r Runner.app.zip Runner.app
2331
2432
- uses: actions/upload-artifact@v4
2533
with:
2634
name: builds-ios
2735
path: build/ios/iphoneos/Runner.app
2836

37+
build_ipa:
38+
name: IPA
39+
runs-on: macos-latest
40+
steps:
41+
- name: Checkout application
42+
uses: actions/checkout@v5
43+
with:
44+
ref: ${{ inputs.ref }}
45+
46+
- name: Common flutter setup
47+
uses: ./.github/actions/flutter-common
48+
49+
# This seems to be related to https://github.com/actions/runner-images/issues/12758
50+
- name: Xcode setup
51+
run: |
52+
sudo xcode-select --switch /Applications/Xcode_16.4.app
53+
54+
- name: Build .xcarchive
55+
run: |
56+
flutter build ipa --release --no-codesign
57+
cd build/ios/archive
58+
zip -r Runner.xcarchive.zip Runner.xcarchive
59+
60+
- uses: actions/upload-artifact@v4
61+
with:
62+
name: builds-ipa
63+
path: build/ios/archive/Runner.xcarchive.zip
64+
2965
build_macos:
3066
name: macOS
3167
runs-on: macos-latest
3268
steps:
3369
- name: Checkout application
34-
uses: actions/checkout@v4
70+
uses: actions/checkout@v5
3571
with:
3672
ref: ${{ inputs.ref }}
3773

3874
- name: Common flutter setup
3975
uses: ./.github/actions/flutter-common
4076

4177
- name: Build .app
42-
run: flutter build macos --release
78+
run: |
79+
flutter build macos --release
80+
cd build/macos/Build/Products/Release
81+
zip -r wger.app.zip wger.app
4382
4483
- uses: actions/upload-artifact@v4
4584
with:
4685
name: builds-macos
47-
path: build/macos/Build/Products/Release/wger.app
86+
path: build/macos/Build/Products/Release/wger.app.zip

.github/workflows/build-linux.yml

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,76 @@ on:
55
ref:
66
required: true
77
type: string
8+
secrets:
9+
SSH_DEPLOY_KEY:
10+
required: true
811
jobs:
12+
13+
# TODO: note that we currently only build for x64, as arm64 is not supported by
14+
# subosito/flutter-action@v2 yet and we don't want to install flutter manually
15+
# just for this workflow: https://github.com/subosito/flutter-action/issues/345
916
build_linux:
10-
name: Flathub
11-
runs-on: ubuntu-latest
17+
name: Build application - ${{ matrix.platform }}
18+
runs-on: ${{ matrix.runner }}
19+
strategy:
20+
matrix:
21+
include:
22+
- platform: x64
23+
runner: ubuntu-latest
24+
# - platform: arm64
25+
# runner: ubuntu-24.04-arm
1226
steps:
1327
- name: Checkout application
14-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
1529
with:
1630
ref: ${{ inputs.ref }}
1731

1832
- name: Common setup
1933
uses: ./.github/actions/flutter-common
2034

21-
# Compare with list of available packages on the runner:
2235
# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md
2336
- name: Build application for linux
2437
run: |
25-
# ninja-build
2638
sudo apt update
2739
sudo apt install -y pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev --no-install-recommends
2840
flutter build linux --release
29-
cd flatpak/scripts
30-
dart pub get
31-
dart flatpak_packager.dart --meta ../flatpak_meta.json --addTodaysVersion ${{inputs.ref}}
32-
41+
tar -zcvf linux-${{ matrix.platform }}.tar.gz build/linux/${{ matrix.platform }}/release/bundle
3342
- uses: actions/upload-artifact@v4
3443
with:
3544
name: builds-linux
3645
path: |
37-
flatpak/scripts/flatpak_generator_exports/wger-linux-x86_64.tar.gz
38-
flatpak/scripts/flatpak_generator_exports/wger-linux-x86_64.sha256
46+
linux-${{ matrix.platform }}.tar.gz
47+
48+
generate_flathub_manifest:
49+
runs-on: ubuntu-latest
50+
name: Update flathub manifest
51+
52+
# If the job fails just continue, this can be done manually later
53+
continue-on-error: true
54+
needs:
55+
- build_linux
56+
steps:
57+
58+
- name: Checkout flatpak-flathub repo
59+
uses: actions/checkout@v5
60+
with:
61+
repository: wger-project/de.wger.flutter
62+
63+
- name: Bump version and update manifest
64+
run: |
65+
pip install pyyaml toml packaging
66+
git clone https://github.com/TheAppgineer/flatpak-flutter.git --branch 0.7.2 ../flatpak-flutter
67+
python bump-wger-version.py ${{ inputs.ref }}
68+
../flatpak-flutter/flatpak-flutter.py --app-module wger flatpak-flutter.json
69+
70+
- name: Push updated config to flathub repository
71+
uses: cpina/github-action-push-to-another-repository@main
72+
env:
73+
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
74+
with:
75+
destination-github-username: wger-project
76+
destination-repository-name: de.wger.flutter
77+
user-email: [email protected]
78+
target-branch: release-${{ inputs.ref }}
79+
create-target-branch-if-needed: true
80+
commit-message: Update to ${{ inputs.ref }}

.github/workflows/build-windows.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@ on:
66
required: true
77
type: string
88
jobs:
9+
# TODO: note that we currently only upload the .exe file, which is not
10+
# sufficient for a proper Windows release. See the documentation
11+
# for what would be necessary (low priority, but nice to have):
12+
# https://docs.flutter.dev/platform-integration/windows/building
913
build_windows:
1014
name: Windows
1115
runs-on: windows-latest
1216
steps:
1317
- name: Checkout application
14-
uses: actions/checkout@v4
18+
uses: actions/checkout@v5
1519
with:
1620
ref: ${{ inputs.ref }}
1721

.github/workflows/bump-version.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@ jobs:
1313
steps:
1414

1515
- name: Checkout application
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717
with:
1818
fetch-depth: 0 # needed to push changes
1919
token: ${{ secrets.GITHUB_TOKEN }}
2020

2121
- name: Common flutter setup
2222
uses: ./.github/actions/flutter-common
2323

24+
- name: Setup uv
25+
uses: astral-sh/setup-uv@v6
26+
2427
- name: Validate version
2528
run: |
2629
RELEASE_VERSION="${{ inputs.app_version }}"
@@ -39,11 +42,16 @@ jobs:
3942
NEXT_BUILD=$(( (CURRENT_BUILD / 10 + 1) * 10 ))
4043
flutter pub run cider version ${{ inputs.app_version }}+${NEXT_BUILD}
4144
45+
- name: Bump flatpak version
46+
run: |
47+
cd flatpak
48+
uv run bump-flatpak-version.py ${{ inputs.app_version }}
49+
4250
- name: Tag release and commit pubspec
4351
run: |
4452
git config user.name Github-Actions
4553
git config user.email [email protected]
46-
git add pubspec.yaml
47-
git commit -m "Bump version to $( flutter pub run cider version )"
54+
git add pubspec.yaml flatpak/de.wger.flutter.metainfo.xml
55+
git commit -m "Bump version to ${{ inputs.app_version }}"
4856
git tag ${{ inputs.app_version }}
4957
git push origin HEAD:master --tags

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
name: Run tests
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
2121

2222
- name: Common flutter setup
2323
uses: ./.github/actions/flutter-common

.github/workflows/linter.yml.bak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: flutter pub get
2727

2828
- name: Check for formatting issues (run "dart format . ")
29-
run: dart format --line-length=100 .
29+
run: dart format .
3030

3131
- name: Push a commit with the changed files
3232
continue-on-error: true

.github/workflows/make-release.yml

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
uses: ./.github/workflows/build-linux.yml
2727
with:
2828
ref: ${{ github.event.inputs.version }}
29+
secrets:
30+
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
2931

3032
build_android:
3133
name: Android
@@ -59,12 +61,12 @@ jobs:
5961
- build_linux
6062
steps:
6163
- name: Checkout application
62-
uses: actions/checkout@v4
64+
uses: actions/checkout@v5
6365
with:
6466
ref: ${{ github.event.inputs.version }}
6567

6668
- name: Download builds
67-
uses: actions/download-artifact@v4
69+
uses: actions/download-artifact@v5
6870
with:
6971
path: /tmp/
7072

@@ -103,7 +105,7 @@ jobs:
103105
# - build_apple
104106
# steps:
105107
# - name: Checkout application
106-
# uses: actions/checkout@v4
108+
# uses: actions/checkout@v5
107109
# with:
108110
# ref: feature/build-process
109111
# # ref: ${{ github.event.inputs.version }}
@@ -112,7 +114,7 @@ jobs:
112114
# uses: ./.github/actions/flutter-common
113115
#
114116
# - name: Download builds
115-
# uses: actions/download-artifact@v4
117+
# uses: actions/download-artifact@v5
116118
# with:
117119
# path: /tmp/
118120
#
@@ -131,54 +133,20 @@ jobs:
131133

132134
steps:
133135
- name: Download builds
134-
uses: actions/download-artifact@v4
136+
uses: actions/download-artifact@v5
135137

136138
- name: Make Github release
137139
uses: softprops/action-gh-release@v2
138140
with:
141+
generate_release_notes: true
139142
tag_name: ${{ inputs.version }}
140143
files: |
141144
builds-aab/app-release.aab
142145
builds-apk/app-release.apk
143-
builds-linux/wger-linux-x86_64.tar.gz
144-
builds-linux/wger-linux-x86_64.sha256
145-
builds-ios/Runner.app
146-
builds-macos/wger.app
146+
builds-linux/linux-x64.tar.gz
147+
builds-ios/Runner.app.zip
148+
builds-ipa/Runner.xcarchive.zip
149+
builds-macos/wger.app.zip
147150
builds-windows/wger.exe
148151
149-
generate_flathub_manifest:
150-
runs-on: ubuntu-latest
151-
name: Upload flathub manifest
152-
needs:
153-
- make_gh_release
154-
steps:
155-
- name: Checkout application
156-
uses: actions/checkout@v4
157-
with:
158-
ref: ${{ github.event.inputs.version }}
159-
160-
- name: Common flutter setup
161-
uses: ./.github/actions/flutter-common
162-
163-
- name: Generate manifest
164-
run: |
165-
cd flatpak/scripts
166-
dart pub get
167-
dart manifest_generator.dart --meta ../flatpak_meta.json --github
168-
mkdir ../../flathub
169-
cp flatpak_generator_exports/de.wger.flutter.json ../../flathub
170-
cp flatpak_generator_exports/flathub.json ../../flathub
171-
172-
- name: Push updated config to flathub repository
173-
uses: cpina/github-action-push-to-another-repository@main
174-
env:
175-
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
176-
with:
177-
source-directory: flathub
178-
destination-github-username: wger-project
179-
destination-repository-name: de.wger.flutter
180-
user-email: [email protected]
181-
target-branch: release-${{ github.event.inputs.version }}
182-
create-target-branch-if-needed: true
183-
commit-message: Update to ${{ github.event.inputs.version }}
184152

0 commit comments

Comments
 (0)