-
Notifications
You must be signed in to change notification settings - Fork 0
219 lines (219 loc) · 7.38 KB
/
main.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
212
213
214
215
216
217
218
219
name: "main"
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
permissions:
contents: write
jobs:
maccompile:
name: Compile EfiToggler for macOS Intel 64
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Compile CLI
run: |
cd efitoggler_cli
mkdir dist
dart pub get
dart compile exe bin/efitoggler_cli.dart -o efitoggler_cli
mv efitoggler_cli dist
- name: Compile and ZIP GUI
run: |
cd efitoggler_gui
flutter pub get
flutter config --enable-macos-desktop
flutter build macos --release
mkdir build/macos/Build/Products/Release/app
mv 'build/macos/Build/Products/Release/Efi Toggler.app' build/macos/Build/Products/Release/app
- uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: efitoggler_gui.zip
directory: efitoggler_gui/build/macos/Build/Products/Release/app
- run: |
cd efitoggler_gui
mkdir build/macos/Build/Products/Release/app/zip
mv build/macos/Build/Products/Release/app/efitoggler_gui.zip build/macos/Build/Products/Release/app/zip
- uses: actions/upload-artifact@v2
with:
name: bin-efitoggler_cli
path: efitoggler_cli/dist
- uses: actions/upload-artifact@v2
with:
name: bin-efitoggler_gui
path: efitoggler_gui/build/macos/Build/Products/Release/app/zip
linuxcompile:
needs: maccompile
name: Compile all linux utilites
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Compile CLI
run: |
mkdir rsyncer_cli/dist
mkdir ext4_optimizer_cli/dist
mkdir usb_manager_cli/dist
cd rsyncer_cli
dart pub get
dart compile exe bin/rsyncer_cli.dart -o rsyncer_cli-amd64
mv rsyncer_cli-amd64 dist
cd ../ext4_optimizer_cli
dart pub get
dart compile exe bin/ext4_optimizer_cli.dart -o ext4_optimizer_cli-amd64
mv ext4_optimizer_cli-amd64 dist
cd ../usb_manager_cli
dart pub get
dart compile exe bin/usb_manager_cli.dart -o usb_manager_cli-amd64
mv usb_manager_cli-amd64 dist
- name: Compile GUI
run: |
sudo apt update -y
sudo apt install -y clang ninja-build libgtk-3-dev
flutter doctor
flutter config --enable-linux-desktop
cd rsyncer_gui
flutter pub get
flutter build linux --release
cd ../ext4_optimizer_gui
flutter pub get
flutter build linux --release
cd ../usb_manager_gui
flutter pub get
flutter build linux --release
- uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: rsyncer_gui-amd64.zip
directory: rsyncer_gui/build/linux/x64/release/bundle
- run: |
cd rsyncer_gui
mkdir build/linux/x64/release/bundle/zip
mv build/linux/x64/release/bundle/rsyncer_gui-amd64.zip build/linux/x64/release/bundle/zip
- uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: ext4_optimizer_gui-amd64.zip
directory: ext4_optimizer_gui/build/linux/x64/release/bundle
- run: |
cd ext4_optimizer_gui
mkdir build/linux/x64/release/bundle/zip
mv build/linux/x64/release/bundle/ext4_optimizer_gui-amd64.zip build/linux/x64/release/bundle/zip
- uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: usb_manager_gui-amd64.zip
directory: usb_manager_gui/build/linux/x64/release/bundle
- run: |
cd usb_manager_gui
mkdir build/linux/x64/release/bundle/zip
mv build/linux/x64/release/bundle/usb_manager_gui-amd64.zip build/linux/x64/release/bundle/zip
- uses: actions/upload-artifact@v2
with:
name: bin-rsyncer_cli-amd64
path: rsyncer_cli/dist
- uses: actions/upload-artifact@v2
with:
name: bin-ext4_optimizer_cli-amd64
path: ext4_optimizer_cli/dist
- uses: actions/upload-artifact@v2
with:
name: bin-usb_manager_cli-amd64
path: usb_manager_cli/dist
- uses: actions/upload-artifact@v2
with:
name: bin-rsyncer_gui-amd64
path: rsyncer_gui/build/linux/x64/release/bundle/zip
- uses: actions/upload-artifact@v2
with:
name: bin-ext4_optimizer_gui-amd64
path: ext4_optimizer_gui/build/linux/x64/release/bundle/zip
- uses: actions/upload-artifact@v2
with:
name: bin-usb_manager_gui-amd64
path: usb_manager_gui/build/linux/x64/release/bundle/zip
#armlinuxcompile:
# needs: linuxcompile
#name: Compile for arm64
#runs-on: ubuntu-18.04
#steps:
#- uses: actions/checkout@v2
#- uses: docker/setup-qemu-action@v2
#- run: |
#docker run --rm \
#--platform linux/arm64 \
#--volume "$PWD:$PWD" \
# --workdir "$PWD" \
# docker.io/library/dart:latest \
#/bin/sh -c "chmod +x arm64build && ./arm64build"
#- uses: actions/upload-artifact@v2
#with:
#name: bin-rsyncer_cli-arm64
#path: rsyncer_cli/dist
#- uses: actions/upload-artifact@v2
#with:
#name: bin-ext4_optimizer_cli-arm64
#path: ext4_optimizer_cli/dist
#- uses: actions/upload-artifact@v2
#with:
#name: bin-usb_manager_cli-arm64
#path: usb_manager_cli/dist
release:
needs: linuxcompile #armlinuxcompile
name: Release to Repository
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: bin-efitoggler_cli
path: bin-efcli
- uses: actions/download-artifact@v2
with:
name: bin-efitoggler_gui
path: bin-efgui
- uses: actions/download-artifact@v2
with:
name: bin-rsyncer_cli-amd64
path: bin-rsycliamd64
- uses: actions/download-artifact@v2
with:
name: bin-ext4_optimizer_cli-amd64
path: bin-extcliamd64
- uses: actions/download-artifact@v2
with:
name: bin-usb_manager_cli-amd64
path: bin-usbcliamd64
- uses: actions/download-artifact@v2
with:
name: bin-rsyncer_gui-amd64
path: bin-rsyguiamd64
- uses: actions/download-artifact@v2
with:
name: bin-ext4_optimizer_gui-amd64
path: bin-extguiamd64
- uses: actions/download-artifact@v2
with:
name: bin-usb_manager_gui-amd64
path: bin-usbguiamd64
#- uses: actions/download-artifact@v2
#with:
#name: bin-rsyncer_cli-arm64
#path: bin-rsycliarm64
#- uses: actions/download-artifact@v2
#with:
#name: bin-ext4_optimizer_cli-arm64
#path: bin-extcliarm64
#- uses: actions/download-artifact@v2
#with:
#name: bin-usb_manager_cli-arm64
#path: bin-usbcliarm64
- uses: softprops/action-gh-release@v1
with:
draft: true
files: bin-*/*