Skip to content

Commit 05f9cad

Browse files
committed
Upgrade project layout and upgrade dependencies
1 parent 076102c commit 05f9cad

File tree

892 files changed

+3694
-43315
lines changed

Some content is hidden

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

892 files changed

+3694
-43315
lines changed

.github/workflows/build.yml

+59-71
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,33 @@
11
name: Flutter build
22

3-
on:
3+
on:
44
push:
55
branches:
66
- "*"
77
tags:
88
- stable
99
- nightly
10-
release:
10+
release:
11+
types: [published]
1112
pull_request:
1213
jobs:
1314
build-apk:
1415
concurrency: ci-${{ github.ref }}
1516
defaults:
1617
run:
1718
working-directory: app
18-
runs-on: ubuntu-22.04
19+
runs-on: ubuntu-24.04
1920
steps:
2021
- name: ⬆️ Checkout
2122
uses: actions/checkout@v4
2223
- name: 🔧 Setup java
2324
uses: actions/setup-java@v4
2425
with:
2526
java-version: "17"
26-
distribution: "adopt"
27-
- name: Get flutter version
28-
run: |
29-
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
30-
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
27+
distribution: "temurin"
3128
- uses: subosito/[email protected]
3229
with:
33-
flutter-version: ${{ env.FLUTTER_VERSION }}
34-
channel: 'master'
30+
flutter-version-file: app/pubspec.yaml
3531
- name: 📦 Get dependencies
3632
run: |
3733
flutter clean
@@ -48,12 +44,12 @@ jobs:
4844
if [[ -n "$KEY_JKS" ]] ; then echo "$KEY_JKS" | base64 --decode > key.jks ; fi
4945
#- run: flutter test
5046
- name: 🏭 Build nightly
51-
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.prerelease) }}
47+
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }}
5248
run: |
5349
flutter build apk -v --release --flavor nightly --dart-define=flavor=nightly
5450
cp build/app/outputs/flutter-apk/app-nightly-release.apk linwood-flow-android.apk
5551
- name: 🏭 Build production
56-
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.prerelease) }}
52+
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
5753
run: |
5854
flutter build apk -v --release --flavor production
5955
cp build/app/outputs/flutter-apk/app-production-release.apk linwood-flow-android.apk
@@ -63,14 +59,14 @@ jobs:
6359
name: apk-build
6460
path: app/linwood-flow-android.apk
6561
- name: 🏭 Build architecture nightly
66-
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.prerelease) }}
62+
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }}
6763
run: |
6864
flutter build apk -v --release --target-platform android-arm,android-arm64,android-x64 --split-per-abi --flavor nightly --dart-define=flavor=nightly
6965
cp build/app/outputs/flutter-apk/app-armeabi-v7a-nightly-release.apk linwood-flow-android-arm.apk
7066
cp build/app/outputs/flutter-apk/app-arm64-v8a-nightly-release.apk linwood-flow-android-arm64.apk
7167
cp build/app/outputs/flutter-apk/app-x86_64-nightly-release.apk linwood-flow-android-x86_64.apk
7268
- name: 🏭 Build architecture production
73-
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.prerelease) }}
69+
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
7470
run: |
7571
flutter build apk -v --release --target-platform android-arm,android-arm64,android-x64 --split-per-abi --flavor production
7672
cp build/app/outputs/flutter-apk/app-armeabi-v7a-production-release.apk linwood-flow-android-arm.apk
@@ -99,15 +95,11 @@ jobs:
9995
steps:
10096
- name: ⬆️ Checkout
10197
uses: actions/checkout@v4
102-
- name: Get flutter version
103-
shell: bash
104-
run: |
105-
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
106-
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
98+
- name: Make yq tool available on Windows runners
99+
run: choco install yq
107100
- uses: subosito/[email protected]
108101
with:
109-
flutter-version: ${{ env.FLUTTER_VERSION }}
110-
channel: 'master'
102+
flutter-version-file: app/pubspec.yaml
111103
- name: ✅ Enable platforms
112104
run: flutter config --enable-windows-desktop
113105
- name: 📦 Get dependencies
@@ -116,12 +108,12 @@ jobs:
116108
flutter pub get
117109
flutter doctor -v
118110
- name: 🏭 Build nightly
119-
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.prerelease) }}
111+
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }}
120112
run: |
121113
flutter doctor -v
122114
flutter build windows -v --release --dart-define=flavor=nightly
123115
- name: 🏭 Build production
124-
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.prerelease) }}
116+
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
125117
run: |
126118
flutter doctor -v
127119
flutter build windows -v --release --dart-define=flavor=production
@@ -148,7 +140,7 @@ jobs:
148140
path: |
149141
app/linwood-flow-windows-setup-x86_64.exe
150142
build-linux:
151-
runs-on: ubuntu-22.04
143+
runs-on: ubuntu-24.04
152144
defaults:
153145
run:
154146
working-directory: app
@@ -179,14 +171,9 @@ jobs:
179171
libsecret-1-dev \
180172
libjsoncpp-dev \
181173
rpm
182-
- name: Get flutter version
183-
run: |
184-
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
185-
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
186174
- uses: subosito/[email protected]
187175
with:
188-
flutter-version: ${{ env.FLUTTER_VERSION }}
189-
channel: 'master'
176+
flutter-version-file: app/pubspec.yaml
190177
- name: ✅ Enable platforms
191178
run: flutter config --enable-linux-desktop
192179
- name: 📦 Get dependencies
@@ -195,12 +182,12 @@ jobs:
195182
flutter pub get
196183
flutter doctor -v
197184
- name: 🏭 Build nightly
198-
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.prerelease) }}
185+
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }}
199186
run: |
200187
flutter doctor -v
201188
flutter build linux -v --release --dart-define=flavor=nightly
202189
- name: 🏭 Build production
203-
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.prerelease) }}
190+
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
204191
run: |
205192
flutter doctor -v
206193
flutter build linux -v --release --dart-define=flavor=production
@@ -260,7 +247,7 @@ jobs:
260247
app/linwood-flow-linux-x86_64.AppImage
261248
build-flatpak:
262249
name: build-flatpak
263-
runs-on: ubuntu-20.04
250+
runs-on: ubuntu-22.04
264251
defaults:
265252
run:
266253
working-directory: app
@@ -290,14 +277,9 @@ jobs:
290277
alien \
291278
libsecret-1-dev \
292279
libjsoncpp-dev
293-
- name: Get flutter version
294-
run: |
295-
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
296-
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
297280
- uses: subosito/[email protected]
298281
with:
299-
flutter-version: ${{ env.FLUTTER_VERSION }}
300-
channel: 'master'
282+
flutter-version-file: app/pubspec.yaml
301283
- name: ✅ Enable platforms
302284
run: flutter config --enable-linux-desktop
303285
- name: 📦 Get dependencies
@@ -306,12 +288,12 @@ jobs:
306288
flutter pub get
307289
flutter doctor -v
308290
- name: 🏭 Build nightly
309-
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.prerelease) }}
291+
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }}
310292
run: |
311293
flutter doctor -v
312294
flutter build linux -v --release --dart-define=flavor=nightly
313295
- name: 🏭 Build production
314-
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.prerelease) }}
296+
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
315297
run: |
316298
flutter doctor -v
317299
flutter build linux -v --release --dart-define=flavor=production
@@ -354,17 +336,12 @@ jobs:
354336
steps:
355337
- name: ⬆️ Checkout
356338
uses: actions/checkout@v4
357-
- name: Get flutter version
358-
run: |
359-
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
360-
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
361339
- uses: subosito/[email protected]
362340
with:
363-
flutter-version: ${{ env.FLUTTER_VERSION }}
364-
channel: 'master'
341+
flutter-version-file: app/pubspec.yaml
365342
- uses: actions/setup-python@v5
366343
with:
367-
python-version: '3.11'
344+
python-version: "3.12"
368345
- name: ✅ Enable platforms
369346
run: flutter config --enable-macos-desktop
370347
- name: 📦 Get dependencies
@@ -381,9 +358,11 @@ jobs:
381358
- name: Setup node
382359
uses: actions/setup-node@v4
383360
with:
384-
node-version: '20'
361+
node-version: "22"
385362
- name: Install appdmg
386-
run: npm install -g appdmg
363+
run: |
364+
python3 -m pip install setuptools
365+
npm install -g appdmg
387366
- name: Create dmg
388367
run: |
389368
appdmg DmgSetup.json linwood-flow-macos.dmg
@@ -409,14 +388,9 @@ jobs:
409388
steps:
410389
- name: ⬆️ Checkout
411390
uses: actions/checkout@v4
412-
- name: Get flutter version
413-
run: |
414-
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
415-
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
416391
- uses: subosito/[email protected]
417392
with:
418-
flutter-version: ${{ env.FLUTTER_VERSION }}
419-
channel: 'master'
393+
flutter-version-file: app/pubspec.yaml
420394
- name: 📦 Get dependencies
421395
run: |
422396
flutter clean
@@ -433,7 +407,7 @@ jobs:
433407
cp -R Runner.app Payload/
434408
rm -f linwood-flow-ios.ipa
435409
zip -vr linwood-flow-ios.ipa Payload/
436-
# ls -l linwood-flow-ios.ipa
410+
# ls -l linwood-flow-ios.ipa
437411
- name: Archive
438412
uses: actions/upload-artifact@v4
439413
with:
@@ -460,9 +434,9 @@ jobs:
460434
# - uses: actions/upload-artifact@v4
461435
# with:
462436
# name: flow-snap
463-
# path: ${{ steps.build.outputs.snap }}
437+
# path: ${{ steps.build.outputs.snap }}
464438
deploy:
465-
runs-on: ubuntu-22.04
439+
runs-on: ubuntu-24.04
466440
if: github.event_name != 'pull_request'
467441
outputs:
468442
version: ${{ steps.setup.outputs.FLOW_VERSION }}
@@ -551,8 +525,25 @@ jobs:
551525
git config --global user.email "[email protected]"
552526
git config --global user.name "Actions"
553527
git pull --tags
528+
- name: Add checksums
529+
run: |
530+
output_file="checksums.txt"
531+
532+
# Empty the output file if it exists
533+
> "$output_file"
534+
535+
# Find and loop through all files starting with "linwood-flow" in the current directory
536+
for file in linwood-flow*; do
537+
# Check if the file exists (in case no matches were found)
538+
if [ -f "$file" ]; then
539+
# Append sha256sum to the output file in the format "hash filename"
540+
sha256sum "$file" >> "$output_file"
541+
fi
542+
done
543+
544+
echo "SHA256 hashes for files starting with 'linwood-flow' saved to $output_file"
554545
- name: 🚀 Deploy stable
555-
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.prerelease) }}
546+
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
556547
uses: softprops/action-gh-release@v2
557548
continue-on-error: true
558549
with:
@@ -570,6 +561,7 @@ jobs:
570561
linwood-flow-macos.dmg
571562
linwood-flow-android.apk
572563
linwood-flow-ios.ipa
564+
checksums.txt
573565
env:
574566
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
575567
- name: 🚀 Deploy nightly
@@ -594,6 +586,7 @@ jobs:
594586
linwood-flow-android-arm64.apk
595587
linwood-flow-android-x86_64.apk
596588
linwood-flow-ios.ipa
589+
checksums.txt
597590
env:
598591
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
599592
- name: Release
@@ -619,8 +612,8 @@ jobs:
619612
env:
620613
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
621614
deploy-to-play-store:
622-
runs-on: ubuntu-22.04
623-
if: ${{ startsWith(github.ref, 'refs/tags/') }}
615+
runs-on: ubuntu-24.04
616+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
624617
defaults:
625618
run:
626619
working-directory: app
@@ -650,22 +643,17 @@ jobs:
650643
uses: actions/setup-java@v4
651644
with:
652645
java-version: "17"
653-
distribution: "adopt"
654-
- name: Get flutter version
655-
run: |
656-
FLUTTER_VERSION=$(cat ../FLUTTER_VERSION)
657-
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
646+
distribution: "temurin"
658647
- uses: subosito/[email protected]
659648
with:
660-
flutter-version: ${{ env.FLUTTER_VERSION }}
661-
channel: 'master'
649+
flutter-version-file: app/pubspec.yaml
662650
- name: 📦 Get dependencies
663651
run: |
664652
flutter pub get
665653
- name: Setup Fastlane
666654
uses: ruby/setup-ruby@v1
667655
with:
668-
ruby-version: "3.3.0"
656+
ruby-version: "3.3.5"
669657
bundler-cache: true
670658
working-directory: app/android
671659
- name: 🚀 Deploy to Play Store
@@ -687,7 +675,7 @@ jobs:
687675
- uses: actions/checkout@v4
688676
with:
689677
token: ${{ secrets.CI_PAT }}
690-
- if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.prerelease) }}
678+
- if: ${{ github.ref == 'refs/tags/stable' }}
691679
uses: vedantmgoyal2009/winget-releaser@v2
692680
with:
693681
identifier: LinwoodDev.Flow

.github/workflows/compress-images.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
# Compress images on demand (workflow_dispatch), and at 11pm every Sunday (schedule).
22
# Open a Pull Request if any images can be compressed.
33
name: Compress Images
4-
permissions:
5-
contents: write
6-
pull-requests: write
74
on:
85
workflow_dispatch:
96
schedule:
10-
- cron: '00 23 * * 0'
7+
- cron: "00 23 * * 0"
118
jobs:
129
build:
1310
name: calibreapp/image-actions
@@ -29,4 +26,3 @@ jobs:
2926
branch-suffix: timestamp
3027
commit-message: Compressed Images
3128
body: ${{ steps.calibre.outputs.markdown }}
32-
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)