-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.58 KB
/
build-windows.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
# .github\workflows\build.yml
name: build and release windows
on:
push:
branches:
- release
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Install flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.22.0
- name: Cache pubspec
id: cache-pubspec
uses: actions/cache@v3
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
pubspec-
- name: Run pub get
run: flutter pub get
- name: Bump build number
run: |
flutter pub global activate cider
- name: Build windows
run: |
flutter config --enable-windows-desktop
flutter build windows -v --release
- name: Set tag name
run: echo "tag_name=v$(cider version)" >> $env:GITHUB_ENV
- name: Archive release
uses: thedoctor0/[email protected]
with:
type: 'zip'
filename: 'windows.zip'
directory: build/windows/x64/runner/Release
- name: Publish release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: build/windows/x64/runner/Release/windows.zip
generateReleaseNotes: true
tag: ${{ env.tag_name }}
token: ${{ secrets.RELEASE_TOKEN }}