-
Notifications
You must be signed in to change notification settings - Fork 10
154 lines (128 loc) · 4.46 KB
/
board.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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: SIT-Board
on:
push:
pull_request: { branches: [master] }
jobs:
build-Android:
runs-on: ubuntu-latest
steps:
- uses: nelonoel/branch-name@v1.0.1
- uses: benjlevesque/short-sha@v1.2
id: short-sha
with: { length: 7 }
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
- name: 🏗️ Build Apk (arm64,android-x64)
run: flutter build apk --split-per-abi --target-platform android-arm64,android-x64,android-arm
- name: Upload armeabi-v7a apk artifact File
uses: actions/upload-artifact@v3
with:
name: ${{ env.BRANCH_NAME }}-${{ env.SHA }}-app-armeabi-v7a-release.apk
path: build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
- name: Upload arm64-v8a apk artifact File
uses: actions/upload-artifact@v3
with:
name: ${{ env.BRANCH_NAME }}-${{ env.SHA }}-app-arm64-v8a-release.apk
path: build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
- name: Upload x86_64 apk artifact File
uses: actions/upload-artifact@v3
with:
name: ${{ env.BRANCH_NAME }}-${{ env.SHA }}-app-x86_64-release.apk
path: build/app/outputs/flutter-apk/app-x86_64-release.apk
build-Windows:
runs-on: windows-latest
steps:
- uses: nelonoel/branch-name@v1.0.1
- uses: benjlevesque/short-sha@v1.2
id: short-sha
with: { length: 7 }
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
- run: |
flutter config --enable-windows-desktop
flutter pub get
flutter build windows
- name: Upload Windows build file
uses: actions/upload-artifact@v3
with:
name: ${{ env.BRANCH_NAME }}-${{ env.SHA }}-windows-x86_64.zip
path: build/windows/runner/Release
build-Linux:
runs-on: ubuntu-latest
steps:
- uses: nelonoel/branch-name@v1.0.1
- uses: benjlevesque/short-sha@v1.2
id: short-sha
with: { length: 7 }
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
- run: |
sudo apt-get update -y
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev
flutter pub get
flutter build linux
- name: Upload linux build File
uses: actions/upload-artifact@v3
with:
name: ${{ env.BRANCH_NAME }}-${{ env.SHA }}-linux-x86_64.zip
path: build/linux/x64/release/bundle
build-iOS:
runs-on: macos-11
steps:
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
- name: 🏗️ Build iOS
run: flutter build ios --no-codesign
build-MacOS:
runs-on: macos-latest
steps:
- uses: nelonoel/branch-name@v1.0.1
- uses: benjlevesque/short-sha@v1.2
id: short-sha
with: { length: 7 }
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
# Building
- name: Build macOS
run: |
flutter config --enable-macos-desktop
flutter pub get
flutter build macos --release
- name: Upload web File
uses: actions/upload-artifact@v3
with:
name: ${{ env.BRANCH_NAME }}-${{ env.SHA }}-macos.zip
path: build/macos/Build/Products/Release
build-Web:
runs-on: ubuntu-latest
steps:
- uses: nelonoel/branch-name@v1.0.1
- uses: benjlevesque/short-sha@v1.2
id: short-sha
with: { length: 7 }
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with: { channel: stable, cache: true }
- run: |
flutter pub get
flutter build web --no-source-maps --no-null-assertions --no-native-null-assertions --release
- name: Upload web File
uses: actions/upload-artifact@v3
with:
name: ${{ env.BRANCH_NAME }}-${{ env.SHA }}-web.zip
path: build/web
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
external_repository: SIT-board/SIT-board.github.io
publish_branch: master
publish_dir: build/web