-
Notifications
You must be signed in to change notification settings - Fork 0
211 lines (165 loc) · 6.12 KB
/
release.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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
on:
release:
types: # This configuration does not affect the page_build event above
- created
name: Release Artifacts
jobs:
build-linux:
name: "Build Linux"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/[email protected]
- name: Setup Flutter SDK
uses: subosito/[email protected]
with:
channel: beta
- name: Install Linux build tools
run: sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev
- name: Enable desktop
run: flutter config --enable-linux-desktop
- name: Install Cider
run: flutter pub global activate cider
- name: Set new Flutter version
run: cider version ${{ github.event.release.tag_name }}
- name: Set release changelog
run: cider release
- name: Flutter get packages
run: flutter pub get
- name: Build Runner & version
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Flutter build app
run: flutter build linux
- name: Compress artifacts
uses: TheDoctor0/[email protected]
with:
filename: linux-${{ github.event.release.tag_name }}.zip
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
# GitHub token.
repo_token: ${{ secrets.GITHUB_TOKEN }}
# Local file to upload.
file: linux-${{ github.event.release.tag_name }}.zip
# Tag to use as a release.
tag: ${{ github.ref }}
build-macos:
name: "Build MacOS"
runs-on: macos-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/[email protected]
- name: Setup Flutter SDK
uses: subosito/[email protected]
with:
channel: beta
- name: Set Up XCode
uses: devbotsxyz/[email protected]
- name: Install create-dmg
run: brew install create-dmg
- name: Enable desktop
run: flutter config --enable-macos-desktop
- name: Install Cider
run: flutter pub global activate cider
- name: Set new Flutter version
run: cider version ${{ github.event.release.tag_name }}
- name: Set release changelog
run: cider release
- name: Flutter get packages
run: flutter pub get
- name: Build Runner & version
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Flutter build app
run: flutter build macos
- name: Create dmg
run: |
./scripts/create_mac_dmg.sh
- name: Compress artifacts
run: zip -r macos-${{ github.event.release.tag_name }}.zip build/macos/Build/Products/Release
- name: Upload artifacts to release
uses: svenstaro/[email protected]
with:
# GitHub token.
repo_token: ${{ secrets.GITHUB_TOKEN }}
# Local file to upload.
file: macos-${{ github.event.release.tag_name }}.zip
# Tag to use as a release.
tag: ${{ github.ref }}
- name: Upload DMG to release
uses: svenstaro/[email protected]
with:
# GitHub token.
repo_token: ${{ secrets.GITHUB_TOKEN }}
# Local file to upload.
file: build/macos/Build/Products/Release/Sidekick.dmg
asset_name: sidekick-macos-${{ github.event.release.tag_name }}.dmg
# Tag to use as a release.
tag: ${{ github.ref }}
build-windows:
name: "Build Windows"
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/[email protected]
- name: Setup Flutter SDK
uses: subosito/[email protected]
with:
channel: beta
- name: Enable desktop
run: flutter config --enable-windows-desktop
- name: Install Cider
run: flutter pub global activate cider
- name: Set new Flutter version
run: cider version ${{ github.event.release.tag_name }}
- name: Set release changelog
run: cider release
- name: Generate MSIX-compatible version
uses: ashley-taylor/[email protected]
id: msixver
with:
value: ${{ github.event.release.tag_name }}
regex: (\-\w+)|(\+\w+)
replacement: ""
- name: Write MSIX
uses: DamianReeves/[email protected]
with:
path: pubspec.yaml
contents: |
msix_config:
display_name: Gatego Autonomous+ Tools
publisher_display_name: Wego Technologies, LLC.
identity_name: io.wegotech.gatego.autonomoustools
msix_version: 1.0.0.0
logo_path: .\assets\logo.png
start_menu_icon_path: .\assets\logo.png
tile_icon_path: .\assets\logo.png
icons_background_color: transparent
architecture: x64
capabilities: "internetClient,removableStorage"
write-mode: append
- name: Flutter get packages
run: flutter pub get
- name: Build Runner & version
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Flutter build app
run: flutter build windows
- name: Create MSIX
run: flutter pub run msix:create
- name: Compress artifacts
run: tar.exe -a -c -f windows-${{ github.event.release.tag_name }}.zip build/windows/Runner/release
- name: Upload artifacts to release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: windows-${{ github.event.release.tag_name }}.zip
tag: ${{ github.ref }}
- name: Upload MSIX to release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/windows/Runner/release/sidekick.msix
asset_name: sidekick-windows-${{ github.event.release.tag_name }}.msix
tag: ${{ github.ref }}