-
Notifications
You must be signed in to change notification settings - Fork 2
119 lines (92 loc) · 3.06 KB
/
Copy pathci.yml
File metadata and controls
119 lines (92 loc) · 3.06 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Build
on:
push:
branches: [master, feat/**]
pull_request:
branches: [master]
workflow_dispatch:
permissions:
contents: read
actions: read
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # actions/checkout@v4.2.2
with:
persist-credentials: false
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # subosito/flutter-action@v2
with:
flutter-version: '3.44.2'
channel: stable
cache: true
- run: flutter pub get
- run: dart run build_runner build --delete-conflicting-outputs
- run: flutter analyze --fatal-infos --fatal-warnings
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # actions/checkout@v4.2.2
with:
persist-credentials: false
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # subosito/flutter-action@v2
with:
flutter-version: '3.44.2'
channel: stable
cache: true
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: flutter test test/unit/ --reporter=github
build-windows:
name: Windows
needs: [lint, test]
runs-on: windows-latest
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # subosito/flutter-action@v2
with:
flutter-version: '3.44.2'
channel: stable
cache: true
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: flutter build windows --release
- name: Package
shell: pwsh
run: Compress-Archive -Path "build\windows\x64\runner\Release\*" -DestinationPath bms-windows.zip
- uses: actions/upload-artifact@v7.0.1
with:
name: bms-windows
path: bms-windows.zip
retention-days: 14
build-macos:
name: macOS
needs: [lint, test]
runs-on: macos-latest
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # subosito/flutter-action@v2
with:
flutter-version: '3.44.2'
channel: stable
cache: true
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: flutter build macos --release
- name: Ad-hoc sign
run: codesign --force --deep --sign - build/macos/Build/Products/Release/bms.app
- name: Package
run: |
cd build/macos/Build/Products/Release
zip -r --symlinks ../../../../../bms-macos.zip bms.app
- uses: actions/upload-artifact@v7.0.1
with:
name: bms-macos
path: bms-macos.zip
retention-days: 14