Skip to content

Commit 6c0faf4

Browse files
committed
Pull ci from butterfly
1 parent 5f50691 commit 6c0faf4

File tree

4 files changed

+81
-9
lines changed

4 files changed

+81
-9
lines changed

.github/workflows/build.yml

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,59 @@ jobs:
4949
run: |
5050
flutter build apk -v --release --flavor nightly --dart-define=flavor=nightly
5151
cp build/app/outputs/flutter-apk/app-nightly-release.apk linwood-flow-android.apk
52+
- name: 🏭 Build nightly (legacy packaging)
53+
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }}
54+
run: |
55+
USE_LEGACY_PACKAGING=true flutter build apk -v --release --flavor nightly --dart-define=flavor=nightly
56+
cp build/app/outputs/flutter-apk/app-nightly-release.apk linwood-flow-android-legacy.apk
5257
- name: 🏭 Build production
5358
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
5459
run: |
5560
flutter build apk -v --release --flavor production
5661
cp build/app/outputs/flutter-apk/app-production-release.apk linwood-flow-android.apk
62+
- name: 🏭 Build production (legacy packaging)
63+
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
64+
run: |
65+
USE_LEGACY_PACKAGING=true flutter build apk -v --release --flavor production
66+
cp build/app/outputs/flutter-apk/app-production-release.apk linwood-flow-android-legacy.apk
5767
- name: Archive
5868
uses: actions/upload-artifact@v4
5969
with:
6070
name: apk-build
6171
path: app/linwood-flow-android.apk
72+
- name: Archive (legacy)
73+
uses: actions/upload-artifact@v4
74+
with:
75+
name: apk-build-legacy
76+
path: app/linwood-flow-android-legacy.apk
6277
- name: 🏭 Build architecture nightly
6378
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }}
6479
run: |
6580
flutter build apk -v --release --target-platform android-arm,android-arm64,android-x64 --split-per-abi --flavor nightly --dart-define=flavor=nightly
6681
cp build/app/outputs/flutter-apk/app-armeabi-v7a-nightly-release.apk linwood-flow-android-arm.apk
6782
cp build/app/outputs/flutter-apk/app-arm64-v8a-nightly-release.apk linwood-flow-android-arm64.apk
6883
cp build/app/outputs/flutter-apk/app-x86_64-nightly-release.apk linwood-flow-android-x86_64.apk
84+
- name: 🏭 Build architecture nightly (legacy packaging)
85+
if: ${{ github.ref != 'refs/tags/stable' && (github.event_name != 'release' || github.event.release.prerelease) }}
86+
run: |
87+
USE_LEGACY_PACKAGING=true flutter build apk -v --release --target-platform android-arm,android-arm64,android-x64 --split-per-abi --flavor nightly --dart-define=flavor=nightly
88+
cp build/app/outputs/flutter-apk/app-armeabi-v7a-nightly-release.apk linwood-flow-android-arm-legacy.apk
89+
cp build/app/outputs/flutter-apk/app-arm64-v8a-nightly-release.apk linwood-flow-android-arm64-legacy.apk
90+
cp build/app/outputs/flutter-apk/app-x86_64-nightly-release.apk linwood-flow-android-x86_64-legacy.apk
6991
- name: 🏭 Build architecture production
7092
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
7193
run: |
7294
flutter build apk -v --release --target-platform android-arm,android-arm64,android-x64 --split-per-abi --flavor production
7395
cp build/app/outputs/flutter-apk/app-armeabi-v7a-production-release.apk linwood-flow-android-arm.apk
7496
cp build/app/outputs/flutter-apk/app-arm64-v8a-production-release.apk linwood-flow-android-arm64.apk
7597
cp build/app/outputs/flutter-apk/app-x86_64-production-release.apk linwood-flow-android-x86_64.apk
98+
- name: 🏭 Build architecture production (legacy packaging)
99+
if: ${{ github.ref == 'refs/tags/stable' || (github.event_name == 'release' && !github.event.release.prerelease) }}
100+
run: |
101+
USE_LEGACY_PACKAGING=true flutter build apk -v --release --target-platform android-arm,android-arm64,android-x64 --split-per-abi --flavor production
102+
cp build/app/outputs/flutter-apk/app-armeabi-v7a-production-release.apk linwood-flow-android-arm-legacy.apk
103+
cp build/app/outputs/flutter-apk/app-arm64-v8a-production-release.apk linwood-flow-android-arm64-legacy.apk
104+
cp build/app/outputs/flutter-apk/app-x86_64-production-release.apk linwood-flow-android-x86_64-legacy.apk
76105
- name: Archive
77106
uses: actions/upload-artifact@v4
78107
with:
@@ -88,6 +117,21 @@ jobs:
88117
with:
89118
name: apk-x86_64-build
90119
path: app/linwood-flow-android-x86_64.apk
120+
- name: Archive (legacy arm)
121+
uses: actions/upload-artifact@v4
122+
with:
123+
name: apk-arm-build-legacy
124+
path: app/linwood-flow-android-arm-legacy.apk
125+
- name: Archive (legacy arm64)
126+
uses: actions/upload-artifact@v4
127+
with:
128+
name: apk-arm64-build-legacy
129+
path: app/linwood-flow-android-arm64-legacy.apk
130+
- name: Archive (legacy x86_64)
131+
uses: actions/upload-artifact@v4
132+
with:
133+
name: apk-x86_64-build-legacy
134+
path: app/linwood-flow-android-x86_64-legacy.apk
91135
build-windows:
92136
runs-on: windows-2025
93137
defaults:
@@ -351,7 +395,7 @@ jobs:
351395
name: linux-${{ matrix.arch.name }}-snap
352396
path: ${{ steps.build.outputs.snap }}
353397
build-macos:
354-
runs-on: macos-latest
398+
runs-on: macos-14
355399
defaults:
356400
run:
357401
working-directory: app
@@ -403,7 +447,7 @@ jobs:
403447
404448
build-ipa:
405449
name: build-ipa (iOS)
406-
runs-on: macos-latest
450+
runs-on: macos-14
407451
defaults:
408452
run:
409453
working-directory: app
@@ -518,6 +562,18 @@ jobs:
518562
- uses: actions/download-artifact@v5
519563
with:
520564
name: apk-x86_64-build
565+
- uses: actions/download-artifact@v5
566+
with:
567+
name: apk-build-legacy
568+
- uses: actions/download-artifact@v5
569+
with:
570+
name: apk-arm-build-legacy
571+
- uses: actions/download-artifact@v5
572+
with:
573+
name: apk-arm64-build-legacy
574+
- uses: actions/download-artifact@v5
575+
with:
576+
name: apk-x86_64-build-legacy
521577
- uses: actions/download-artifact@v5
522578
with:
523579
name: windows-build
@@ -651,6 +707,10 @@ jobs:
651707
linwood-flow-android-arm.apk
652708
linwood-flow-android-arm64.apk
653709
linwood-flow-android-x86_64.apk
710+
linwood-flow-android-legacy.apk
711+
linwood-flow-android-arm-legacy.apk
712+
linwood-flow-android-arm64-legacy.apk
713+
linwood-flow-android-x86_64-legacy.apk
654714
linwood-flow-ios.ipa
655715
checksums.txt
656716
env:
@@ -687,6 +747,10 @@ jobs:
687747
linwood-flow-android-arm.apk
688748
linwood-flow-android-arm64.apk
689749
linwood-flow-android-x86_64.apk
750+
linwood-flow-android-legacy.apk
751+
linwood-flow-android-arm-legacy.apk
752+
linwood-flow-android-arm64-legacy.apk
753+
linwood-flow-android-x86_64-legacy.apk
690754
linwood-flow-ios.ipa
691755
checksums.txt
692756
env:
@@ -721,6 +785,10 @@ jobs:
721785
linwood-flow-android-arm.apk
722786
linwood-flow-android-arm64.apk
723787
linwood-flow-android-x86_64.apk
788+
linwood-flow-android-legacy.apk
789+
linwood-flow-android-arm-legacy.apk
790+
linwood-flow-android-arm64-legacy.apk
791+
linwood-flow-android-x86_64-legacy.apk
724792
linwood-flow-ios.ipa
725793
checksums.txt
726794
env:

.github/workflows/deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,12 @@ jobs:
5353
- uses: subosito/[email protected]
5454
with:
5555
flutter-version-file: app/pubspec.yaml
56+
cache: true
5657
- name: Install dependencies
5758
run: |
5859
flutter pub get
60+
- name: Get Git Commit Hash
61+
run: echo "GIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV
5962
- name: Set flavor
6063
if: github.ref != 'refs/heads/main'
6164
run: |
@@ -67,7 +70,7 @@ jobs:
6770
echo "FLOW_FLAVOR=stable" >> $GITHUB_ENV
6871
echo "WEB_DIR=web" >> $GITHUB_ENV
6972
- name: Build
70-
run: flutter build web --wasm --release --no-web-resources-cdn --dart-define=flavor=$FLOW_FLAVOR
73+
run: flutter build web --wasm --release --no-web-resources-cdn --dart-define=flavor=$FLOW_FLAVOR --dart-define=version=$GIT_HASH
7174
- name: Deploy to SFTP
7275
if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main'
7376
env:

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
- uses: subosito/[email protected]
2525
with:
2626
flutter-version-file: app/pubspec.yaml
27+
cache: true
2728
- name: Setup git
2829
id: setup
2930
run: |
@@ -68,6 +69,7 @@ jobs:
6869
- uses: subosito/[email protected]
6970
with:
7071
flutter-version-file: app/pubspec.yaml
72+
cache: true
7173
- name: Setup git
7274
id: setup
7375
shell: bash
@@ -87,10 +89,6 @@ jobs:
8789
FLOW_VERSION="${{ env.FLOW_VERSION }}"
8890
git tag -fa v${{ env.FLOW_VERSION }} -m "Release ${FLOW_VERSION}"
8991
git push origin v${FLOW_VERSION} -f
90-
- uses: actions/checkout@v5
91-
with:
92-
token: ${{ secrets.CI_PAT }}
93-
fetch-depth: 0
9492
- name: Create release
9593
uses: softprops/action-gh-release@v2
9694
with:
@@ -103,12 +101,12 @@ jobs:
103101
if: ${{ github.event.inputs.stable == 'true' || github.ref == 'refs/heads/main' }}
104102
run: |
105103
git tag -fa stable -m "Find all stable releases here"
106-
git push origin HEAD:stable -f
104+
git push origin stable -f
107105
- name: Retag nightly
108106
if: ${{ github.event.inputs.stable != 'true' && github.ref == 'refs/heads/develop' }}
109107
run: |
110108
git tag -fa nightly -m "Find all nightly releases here"
111-
git push origin HEAD:nightly -f
109+
git push origin nightly -f
112110
- name: Merge in main
113111
if: ${{ github.ref == 'refs/heads/develop' && github.event.inputs.stable == 'true' }}
114112
run: |
@@ -130,6 +128,7 @@ jobs:
130128
- uses: subosito/[email protected]
131129
with:
132130
flutter-version-file: app/pubspec.yaml
131+
cache: true
133132
- name: Setup git
134133
id: setup
135134
run: |
@@ -193,6 +192,7 @@ jobs:
193192
- uses: subosito/[email protected]
194193
with:
195194
flutter-version-file: app/pubspec.yaml
195+
cache: true
196196
- name: Bump version
197197
run: |
198198
git fetch

metadata/en-US/changelogs/12.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
* Update to agb 8.10
1313
* Upgrade to flutter 3.32 and 3.35
1414
* Use minSdkVersion 24 instead of 23 (The minimum version of android is 7.0 (Nougat))
15+
* Add legacy android build
1516

1617
Read more here: https://linwood.dev/flow/0.5.0

0 commit comments

Comments
 (0)