-
Notifications
You must be signed in to change notification settings - Fork 24
65 lines (50 loc) · 1.54 KB
/
windows-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Windows Build
on:
# Runs on push to any of the below branches
push:
branches:
- main
# Runs on pull request events that target one of the below branches
pull_request:
branches:
- main
# Allows you to run this workflow manually from the Actions tab of the repository
workflow_dispatch:
env:
# https://flet.dev/docs/publish#versioning
BUILD_NUMBER: 1
BUILD_VERSION: 1.0.0
# Python version to use
PYTHON_VERSION: 3.12.8
# flet-cli version to install for `flet build`
FLET_CLI_VERSION: 0.27.5
# Ensures Python uses UTF-8 encoding by default
PYTHONUTF8: 1
# Disables rich text formatting in Flet CLI output
FLET_CLI_NO_RICH_OUTPUT: 1
# Disables progress bars when using UV
UV_NO_PROGRESS: 1
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install flet-cli ${{ env.FLET_CLI_VERSION }}
run: |
python -m pip install --upgrade pip
pip install flet-cli==$env:FLET_CLI_VERSION
- name: Flet Build Windows
run: |
flet build windows --verbose --no-rich-output --build-number=$env:BUILD_NUMBER --build-version=$env:BUILD_VERSION
- name: Upload Windows Artifact
uses: actions/[email protected]
with:
name: windows-build-artifact
path: build/windows
if-no-files-found: error
overwrite: false