-
Notifications
You must be signed in to change notification settings - Fork 7
268 lines (216 loc) · 7.11 KB
/
run.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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
name: win_lin_release
on:
push:
branches: [ "main","devel" ]
permissions: read-all
jobs:
##########################################################################
win-pyinstaller-gen-version:
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: python setup
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
check-latest: true
- name: pip upgrade
run: python -m pip install --upgrade pip
- name: install requirements
run: pip install -r requirements.txt
#####################################
- name: generate version number
working-directory: ./scripts
run: "version.gen.bat"
shell: cmd
- name: version upload
uses: actions/upload-artifact@v4
with:
name: version
path: ./src/version.txt
if-no-files-found: error
#####################################
- name: convert icons to python source
working-directory: ./scripts
run: "icons.convert.bat"
shell: cmd
#####################################
- name: run pyinstaller
working-directory: ./scripts
run: "pyinstaller.run.bat"
shell: cmd
#####################################
- name: upload win pyinstaller distro
uses: actions/upload-artifact@v4
with:
name: pyinstaller-win
path: ./build-pyinstaller/dude.win.zip
if-no-files-found: error
##########################################################################
win-nuitka:
needs: [win-pyinstaller-gen-version]
runs-on: windows-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: python setup
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
check-latest: true
- name: pip upgrade
run: python -m pip install --upgrade pip
- name: install requirements
run: pip install -r requirements.txt
#####################################
- name: version download
uses: actions/download-artifact@v4
with:
name: version
path: ./src
#####################################
- name: convert icons to python source
working-directory: ./scripts
run: "icons.convert.bat"
shell: cmd
#####################################
- name: run nuitka
working-directory: ./scripts
run: "nuitka.run.bat"
shell: cmd
#####################################
- name: upload win nuitka distro
uses: actions/upload-artifact@v4
with:
name: nuitka-win
path: ./build-nuitka/dude.win.zip
if-no-files-found: error
##########################################################################
lin-nuitka:
permissions: write-all
needs: [win-nuitka]
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: python setup
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
check-latest: true
- name: pip upgrade
run: python -m pip install --upgrade pip
- name: install requirements
run: pip install -r requirements.txt
- name: strip python binaries
run: find $pythonLocation -name *.so* -type f -exec strip {} \;
#####################################
- name: version download
uses: actions/download-artifact@v4
with:
name: version
path: ./src
#####################################
- name: convert icons to python source
working-directory: ./scripts
run: bash "icons.convert.sh"
#####################################
- name: run nuitka
working-directory: ./scripts
run: bash "nuitka.run.sh"
#####################################
- name: upload lin distro
uses: actions/upload-artifact@v4
with:
name: nuitka-lin
path: ./build-nuitka/dude.lin.zip
if-no-files-found: error
##########################################################################
lin-pyinstaller:
permissions: write-all
needs: [lin-nuitka]
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v4
- name: python setup
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
check-latest: true
- name: pip upgrade
run: python -m pip install --upgrade pip
- name: install requirements
run: pip install -r requirements.txt
- name: strip python binaries
run: find $pythonLocation -name *.so* -type f -exec strip {} \;
#####################################
- name: version download
uses: actions/download-artifact@v4
with:
name: version
path: ./src
- name: convert icons to python source
working-directory: ./scripts
run: bash "icons.convert.sh"
#####################################
- name: run pyinstaller
working-directory: ./scripts
run: bash "pyinstaller.run.sh"
#####################################
- name: upload lin distro
uses: actions/upload-artifact@v4
with:
name: pyinstaller-lin
path: ./build-pyinstaller/dude.lin.zip
if-no-files-found: error
#####################################
- name: version read
id: version
run: echo "version=$(cat ./src/version.txt)" >> $GITHUB_OUTPUT
- name: rename linux distro
run: mv ./build-pyinstaller/dude.lin.zip ./dude.${{ steps.version.outputs.version }}.portable.linux.zip
#####################################
- name: download windows pyinstaller distro
uses: actions/download-artifact@v4
with:
name: pyinstaller-win
path: ./
- name: rename windows distro
run: mv ./dude.win.zip ./dude.${{ steps.version.outputs.version }}.portable.windows.zip
#####################################
- name: download windows nuitka distro
uses: actions/download-artifact@v4
with:
name: nuitka-win
path: ./
- name: rename windows distro
run: mv ./dude.win.zip ./dude.${{ steps.version.outputs.version }}.nuitka.portable.windows.zip
#####################################
- name: download linux nuitka distro
uses: actions/download-artifact@v4
with:
name: nuitka-lin
path: ./
- name: rename linux distro
run: mv ./dude.lin.zip ./dude.${{ steps.version.outputs.version }}.nuitka.portable.linux.zip
#####################################
- name: Create GitHub release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version }}
name: Dude ${{ steps.version.outputs.version }}
draft: false
prerelease: false
files: |
dude.${{ steps.version.outputs.version }}.portable.linux.zip
dude.${{ steps.version.outputs.version }}.portable.windows.zip
dude.${{ steps.version.outputs.version }}.nuitka.portable.linux.zip
dude.${{ steps.version.outputs.version }}.nuitka.portable.windows.zip