-
Notifications
You must be signed in to change notification settings - Fork 102
192 lines (151 loc) · 5.16 KB
/
main.yaml
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
name: Build (Linux, Mac OS, Windows)
on:
push:
branches: [main]
jobs:
build-linux:
name: "Build Linux"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2.4.0
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2.6.1
with:
channel: "stable"
- name: Install Linux build tools
run: sudo apt-get update && sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev squashfs-tools
- name: Enable desktop
run: flutter config --enable-linux-desktop
- name: Get packages
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Flutter build app
run: flutter build linux
- name: Compress artifacts
uses: TheDoctor0/zip-release@0.6.1
with:
filename: linux-dev.zip
- name: Upload Build Zip
uses: actions/upload-artifact@v2.3.1
with:
name: sidekick-linux-dev.zip
path: linux-dev.zip
- name: Install appbuilder deps
run: |
sudo add-apt-repository universe
sudo apt install libfuse2 libgtk-3-0
- name: Install appimagebuilder
run: |
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage
chmod +x appimage-builder-x86_64.AppImage
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
- name: Build AppImage
run: |
appimage-builder --recipe AppImageBuilder.yml
- name: Upload Build AppImage
uses: actions/upload-artifact@v2.3.1
with:
name: sidekick-linux-dev.AppImage
path: Sidekick-latest-x86_64.AppImage
build-macos:
name: "Build MacOS"
runs-on: macos-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2.4.0
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2.6.1
with:
channel: "stable"
- name: Set Up XCode
uses: BoundfoxStudios/action-xcode-select@v1
- name: Enable desktop
run: flutter config --enable-macos-desktop
- name: Get packages
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Flutter build app
run: flutter build macos
- name: Install create-dmg
run: brew install create-dmg
- name: Create dmg
run: |
./scripts/create_mac_dmg.sh
- name: Compress artifacts
run: zip -r macos-dev.zip build/macos/Build/Products/Release
- name: Upload Build DMG
uses: actions/upload-artifact@v2.3.1
with:
name: sidekick-macos-dev.dmg
path: build/macos/Build/Products/Release/Sidekick.dmg
- name: Upload Build Zip
uses: actions/upload-artifact@v2.3.1
with:
name: sidekick-macos-dev.zip
path: macos-dev.zip
build-windows:
name: "Build Windows"
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2.4.0
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2.6.1
with:
channel: "stable"
- name: Enable desktop
run: flutter config --enable-windows-desktop
- name: Get packages
run: flutter pub get
- name: Analyze
run: flutter analyze
- name: Write MSIX
uses: DamianReeves/write-file-action@v1.0
with:
path: pubspec.yaml
contents: |
msix_config:
display_name: Sidekick DEV Build
publisher_display_name: Eduardo M.
identity_name: 44484EduardoM.SidekickFlutter
publisher: CN=1E781C91-227E-4505-B5B8-7E5EFE39D3A6
msix_version: 1.0.0.0
logo_path: assets\promo-windows\icon.png
architecture: x64
capabilities: "internetClient,removableStorage"
certificate_path: windows\SIDEKICK-CERT.pfx
certificate_password: ${{ secrets.WIN_CERT_PASS }}
install_certificate: false
build_windows: false
store: false
write-mode: append
- name: Write MS Store
uses: DamianReeves/write-file-action@v1.0
with:
path: lib/modifiers.dart
contents: |
// Generated file. Do not modify
const isMSStore = false;
write-mode: overwrite
- 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-dev.zip build/windows/Runner/release
- name: Upload Build MSIX
uses: actions/upload-artifact@v2.3.1
with:
name: sidekick-windows-dev.msix
path: build/windows/Runner/release/sidekick.msix
- name: Upload Build Zip
uses: actions/upload-artifact@v2.3.1
with:
name: sidekick-windows-dev.zip
path: windows-dev.zip