Skip to content

Commit 0707d5f

Browse files
committed
update workflows to support Flet v0.27
1 parent d985823 commit 0707d5f

11 files changed

Lines changed: 475 additions & 209 deletions

.github/workflows/aab-build.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ on:
44
# Runs on push to any of the below branches
55
push:
66
branches:
7-
- master
87
- main
8+
99
# Runs on pull request events that target one of the below branches
1010
pull_request:
1111
branches:
12-
- master
1312
- main
1413

1514
# Allows you to run this workflow manually from the Actions tab of the repository
@@ -19,12 +18,28 @@ env:
1918
# https://flet.dev/docs/publish#versioning
2019
BUILD_NUMBER: 1
2120
BUILD_VERSION: 1.0.0
22-
PYTHON_VERSION: 3.12.2
23-
FLUTTER_VERSION: 3.24.0
21+
22+
# Python version to use
23+
PYTHON_VERSION: 3.12.8
24+
25+
# Flutter version to use
26+
FLUTTER_VERSION: 3.27.4
27+
28+
# flet-cli version to install for `flet build`
29+
FLET_CLI_VERSION: 0.27.5
30+
31+
# Ensures Python uses UTF-8 encoding by default
32+
PYTHONUTF8: 1
33+
34+
# Disables rich text formatting in Flet CLI output
35+
FLET_CLI_NO_RICH_OUTPUT: 1
36+
37+
# Disables progress bars when using UV
38+
UV_NO_PROGRESS: 1
2439

2540
jobs:
2641
build:
27-
runs-on: macos-latest
42+
runs-on: ubuntu-latest
2843

2944
steps:
3045
- name: Checkout code
@@ -35,10 +50,10 @@ jobs:
3550
with:
3651
python-version: ${{ env.PYTHON_VERSION }}
3752

38-
- name: Install Python Dependencies
53+
- name: Install flet-cli ${{ env.FLET_CLI_VERSION }}
3954
run: |
4055
python -m pip install --upgrade pip
41-
pip install -r requirements.txt
56+
pip install flet-cli==$FLET_CLI_VERSION
4257
4358
- name: Setup Flutter ${{ env.FLUTTER_VERSION }}
4459
uses: subosito/flutter-action@v2
@@ -47,8 +62,8 @@ jobs:
4762

4863
- name: Flet Build AAB
4964
run: |
50-
flutter config --no-analytics # disable flutter analytics
51-
flet build aab --verbose --build-number $BUILD_NUMBER --build-version $BUILD_VERSION
65+
flutter config --no-analytics
66+
flet build aab --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION
5267
5368
- name: Upload AAB Artifact
5469
uses: actions/upload-artifact@v4.3.4 # https://github.com/marketplace/actions/upload-a-build-artifact
@@ -57,4 +72,3 @@ jobs:
5772
path: build/aab # location of Flet build output
5873
if-no-files-found: error # Fail the action with an error message if no files are found
5974
overwrite: false # If true, an artifact with a matching name will be deleted before a new one is uploaded. If false, the action will fail if an artifact for the given name already exists. Does not fail if the artifact does not exist.
60-

.github/workflows/apk-build.yml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ on:
44
# Runs on push to any of the below branches
55
push:
66
branches:
7-
- master
87
- main
8+
99
# Runs on pull request events that target one of the below branches
1010
pull_request:
1111
branches:
12-
- master
1312
- main
1413

1514
# Allows you to run this workflow manually from the Actions tab of the repository
@@ -19,8 +18,24 @@ env:
1918
# https://flet.dev/docs/publish#versioning
2019
BUILD_NUMBER: 1
2120
BUILD_VERSION: 1.0.0
22-
PYTHON_VERSION: 3.12.2
23-
FLUTTER_VERSION: 3.24.0
21+
22+
# Python version to use
23+
PYTHON_VERSION: 3.12.8
24+
25+
# Flutter version to use
26+
FLUTTER_VERSION: 3.27.4
27+
28+
# flet-cli version to install for `flet build`
29+
FLET_CLI_VERSION: 0.27.5
30+
31+
# Ensures Python uses UTF-8 encoding by default
32+
PYTHONUTF8: 1
33+
34+
# Disables rich text formatting in Flet CLI output
35+
FLET_CLI_NO_RICH_OUTPUT: 1
36+
37+
# Disables progress bars when using UV
38+
UV_NO_PROGRESS: 1
2439

2540
jobs:
2641
build:
@@ -35,26 +50,20 @@ jobs:
3550
with:
3651
python-version: ${{ env.PYTHON_VERSION }}
3752

38-
- name: Install Python Dependencies
53+
- name: Install flet-cli ${{ env.FLET_CLI_VERSION }}
3954
run: |
4055
python -m pip install --upgrade pip
41-
pip install -r requirements.txt
56+
pip install flet-cli==$FLET_CLI_VERSION
4257
4358
- name: Setup Flutter ${{ env.FLUTTER_VERSION }}
4459
uses: subosito/flutter-action@v2
4560
with:
4661
flutter-version: ${{ env.FLUTTER_VERSION }}
4762

48-
- name: Setup Java JDK
49-
uses: actions/setup-java@v4.2.1
50-
with:
51-
distribution: 'temurin' # See https://github.com/marketplace/actions/setup-java-jdk#supported-distributions for available options
52-
java-version: '21'
53-
5463
- name: Flet Build APK
5564
run: |
56-
flutter config --no-analytics # disable flutter analytics
57-
flet build apk --verbose # adapt the command to your needs - https://flet.dev/docs/publish
65+
flutter config --no-analytics
66+
flet build apk --verbose --build-number=$BUILD_NUMBER --build-version=$BUILD_VERSION
5867
5968
- name: Upload APK Artifact
6069
uses: actions/upload-artifact@v4.3.4 # https://github.com/marketplace/actions/upload-a-build-artifact
@@ -63,4 +72,3 @@ jobs:
6372
path: build/apk # location of Flet build output
6473
if-no-files-found: error # Fail the action with an error message if no files are found
6574
overwrite: false # If true, an artifact with a matching name will be deleted before a new one is uploaded. If false, the action will fail if an artifact for the given name already exists. Does not fail if the artifact does not exist.
66-

.github/workflows/desktop-and-mobile-builds.yml

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
name: All Builds (Linux, macOS, Windows, Android, IPA, APK, AAB)
1+
name: Desktop and Mobile Builds (Linux, macOS, Windows, AAB, APK, IPA)
22

33
on:
44
# Runs on push to any of the below branches
55
push:
66
branches:
7-
- master
87
- main
8+
99
# Runs on pull request events that target one of the below branches
1010
pull_request:
1111
branches:
12-
- master
1312
- main
1413

1514
# Allows you to run this workflow manually from the Actions tab of the repository
@@ -19,8 +18,24 @@ env:
1918
# https://flet.dev/docs/publish#versioning
2019
BUILD_NUMBER: 1
2120
BUILD_VERSION: 1.0.0
22-
PYTHON_VERSION: 3.12.2
23-
FLUTTER_VERSION: 3.24.0
21+
22+
# Python version to use
23+
PYTHON_VERSION: 3.12.8
24+
25+
# Flutter version to use
26+
FLUTTER_VERSION: 3.27.4
27+
28+
# flet-cli version to install for `flet build`
29+
FLET_CLI_VERSION: 0.27.5
30+
31+
# Ensures Python uses UTF-8 encoding by default
32+
PYTHONUTF8: 1
33+
34+
# Disables rich text formatting in Flet CLI output
35+
FLET_CLI_NO_RICH_OUTPUT: 1
36+
37+
# Disables progress bars when using UV
38+
UV_NO_PROGRESS: 1
2439

2540
jobs:
2641
build-linux:
@@ -35,10 +50,10 @@ jobs:
3550
with:
3651
python-version: ${{ env.PYTHON_VERSION }}
3752

38-
- name: Install Python Dependencies
53+
- name: Install flet-cli ${{ env.FLET_CLI_VERSION }}
3954
run: |
4055
python -m pip install --upgrade pip
41-
pip install -r requirements.txt
56+
pip install flet-cli==$FLET_CLI_VERSION
4257
4358
- name: Setup Flutter ${{ env.FLUTTER_VERSION }}
4459
uses: subosito/flutter-action@v2
@@ -47,10 +62,8 @@ jobs:
4762

4863
- name: Patch for linux build
4964
run: |
50-
flutter doctor
5165
sudo apt-get update -y
5266
sudo apt-get install -y ninja-build libgtk-3-dev
53-
flutter doctor
5467
5568
- name: Flet Build Linux
5669
run: |
@@ -77,10 +90,10 @@ jobs:
7790
with:
7891
python-version: ${{ env.PYTHON_VERSION }}
7992

80-
- name: Install Python Dependencies
93+
- name: Install flet-cli ${{ env.FLET_CLI_VERSION }}
8194
run: |
8295
python -m pip install --upgrade pip
83-
pip install -r requirements.txt
96+
pip install flet-cli==$FLET_CLI_VERSION
8497
8598
- name: Setup Flutter ${{ env.FLUTTER_VERSION }}
8699
uses: subosito/flutter-action@v2
@@ -112,10 +125,10 @@ jobs:
112125
with:
113126
python-version: ${{ env.PYTHON_VERSION }}
114127

115-
- name: Install Python Dependencies
128+
- name: Install flet-cli ${{ env.FLET_CLI_VERSION }}
116129
run: |
117130
python -m pip install --upgrade pip
118-
pip install -r requirements.txt
131+
pip install flet-cli==$env:FLET_CLI_VERSION
119132
120133
- name: Setup Flutter ${{ env.FLUTTER_VERSION }}
121134
uses: subosito/flutter-action@v2
@@ -136,7 +149,7 @@ jobs:
136149
overwrite: false
137150

138151
build-aab:
139-
runs-on: macos-latest
152+
runs-on: ubuntu-latest
140153

141154
steps:
142155
- name: Checkout code
@@ -147,10 +160,10 @@ jobs:
147160
with:
148161
python-version: ${{ env.PYTHON_VERSION }}
149162

150-
- name: Install Python Dependencies
163+
- name: Install flet-cli ${{ env.FLET_CLI_VERSION }}
151164
run: |
152165
python -m pip install --upgrade pip
153-
pip install -r requirements.txt
166+
pip install flet-cli==$FLET_CLI_VERSION
154167
155168
- name: Setup Flutter ${{ env.FLUTTER_VERSION }}
156169
uses: subosito/flutter-action@v2
@@ -182,22 +195,16 @@ jobs:
182195
with:
183196
python-version: ${{ env.PYTHON_VERSION }}
184197

185-
- name: Install Python Dependencies
198+
- name: Install flet-cli ${{ env.FLET_CLI_VERSION }}
186199
run: |
187200
python -m pip install --upgrade pip
188-
pip install -r requirements.txt
201+
pip install flet-cli==$FLET_CLI_VERSION
189202
190203
- name: Setup Flutter ${{ env.FLUTTER_VERSION }}
191204
uses: subosito/flutter-action@v2
192205
with:
193206
flutter-version: ${{ env.FLUTTER_VERSION }}
194207

195-
- name: Setup Java JDK
196-
uses: actions/setup-java@v4.2.1
197-
with:
198-
distribution: 'temurin'
199-
java-version: '21'
200-
201208
- name: Flet Build APK
202209
run: |
203210
flutter config --no-analytics
@@ -223,10 +230,10 @@ jobs:
223230
with:
224231
python-version: ${{ env.PYTHON_VERSION }}
225232

226-
- name: Install Python Dependencies
233+
- name: Install flet-cli ${{ env.FLET_CLI_VERSION }}
227234
run: |
228235
python -m pip install --upgrade pip
229-
pip install -r requirements.txt
236+
pip install flet-cli==$FLET_CLI_VERSION
230237
231238
- name: Setup Flutter ${{ env.FLUTTER_VERSION }}
232239
uses: subosito/flutter-action@v2
@@ -244,4 +251,4 @@ jobs:
244251
name: ipa-build-artifact
245252
path: build/ipa
246253
if-no-files-found: warn
247-
overwrite: false
254+
overwrite: false

0 commit comments

Comments
 (0)