@@ -34,14 +34,17 @@ jobs:
34
34
- nul : /dev/null
35
35
- runs-on : macos
36
36
fasmg : /source/macos/x64/fasmg
37
+ install-output-ext : " dmg"
37
38
- runs-on : windows
38
39
fasmg : /fasmg.exe
39
40
env : " env:"
40
41
exe : .exe
41
42
nul : nul
42
43
ldflags : LDFLAGS="-static-libgcc -static-libstdc++ -static"
44
+ install-output-ext : " zip"
43
45
- runs-on : ubuntu
44
46
fasmg : /fasmg.x64
47
+ install-output-ext : " tar.gz"
45
48
runs-on : ${{matrix.runs-on}}-latest
46
49
steps :
47
50
- name : Prepare Build Environment
@@ -151,29 +154,54 @@ jobs:
151
154
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_KEYCHAIN_PWD build.keychain
152
155
/usr/bin/codesign --deep --force --verify --verbose --sign "$MACOS_CODESIGN_IDENT" --timestamp --options runtime $CEDEV_BIN/*
153
156
154
- - name : Tar toolchain
155
- if : runner.os != 'Windows'
157
+ - name : " [macOS install] Create the DMG"
158
+ if : runner.os == 'macOS'
159
+ run : |
160
+ brew install create-dmg;
161
+ cp -a "${CEDEV}" "${TOOLCHAIN_PATH}/resources/macOS/dmg/contents/";
162
+ create-dmg \
163
+ --codesign "Developer ID Application: Adrien Bertrand (Z3B7V95FNU)" \
164
+ --volname "CE Programming Toolchain" \
165
+ --volicon "${TOOLCHAIN_PATH}/resources/macOS/dmg/icon.icns" \
166
+ --background "${TOOLCHAIN_PATH}/resources/macOS/dmg/background.png" \
167
+ --window-pos 200 120 \
168
+ --window-size 600 400 \
169
+ --icon-size 64 \
170
+ --icon "Readme.txt" 125 120 \
171
+ --icon "CEdev" 125 275 \
172
+ "CEdev-${{runner.os}}.${{matrix.install-output-ext}}" \
173
+ "${TOOLCHAIN_PATH}/resources/macOS/dmg/contents"
174
+
175
+ - name : " [macOS install] Notarize DMG (master branch push only)"
176
+ if : runner.os == 'macOS' && github.event_name == 'push' && github.ref == 'refs/heads/master'
177
+ uses : adriweb/xcode-notarize-please@v1.1
178
+ with :
179
+ product-path : CEdev-${{runner.os}}.${{matrix.install-output-ext}}
180
+ appstore-connect-username : ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
181
+ appstore-connect-password : ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
182
+ primary-bundle-id : ' com.adriweb.CEToolchain'
183
+
184
+ - name : " [macOS install] Staple DMG (master branch push only)"
185
+ if : runner.os == 'macOS' && github.event_name == 'push' && github.ref == 'refs/heads/master'
186
+ uses : devbotsxyz/xcode-staple@v1.0.0
187
+ with :
188
+ product-path : CEdev-${{runner.os}}.${{matrix.install-output-ext}}
189
+
190
+ - name : " [Linux] Tar toolchain"
191
+ if : runner.os == 'Linux'
156
192
run : |
157
193
chmod +x ${{env.CEDEV_BIN}}/*
158
- tar -C ${{env.CEDEV}}/.. -czvf CEdev-${{runner.os}}.tar.gz CEdev
159
- - name : Zip toolchain
194
+ tar -C ${{env.CEDEV}}/.. -czvf CEdev-${{runner.os}}.${{matrix.install-output-ext}} CEdev
195
+ - name : " [Windows] Zip toolchain"
160
196
if : runner.os == 'Windows'
161
197
run : |
162
- cd ${{env.CEDEV}}/.. && 7z a -tzip CEdev-${{runner.os}}.zip CEdev
163
-
164
- - name : Upload Linux/MacOS CEdev
165
- if : runner.os != 'Windows'
166
- uses : actions/upload-artifact@v2
167
- with :
168
- name : CEdev-${{runner.os}}
169
- path : CEdev-${{runner.os}}.tar.gz
198
+ cd ${{env.CEDEV}}/.. && 7z a -tzip CEdev-${{runner.os}}.${{matrix.install-output-ext}} CEdev
170
199
171
- - name : Upload Windows CEdev
172
- if : runner.os == 'Windows'
200
+ - name : Upload CEdev
173
201
uses : actions/upload-artifact@v2
174
202
with :
175
203
name : CEdev-${{runner.os}}
176
- path : CEdev-${{runner.os}}.zip
204
+ path : CEdev-${{runner.os}}.${{matrix.install-output-ext}}
177
205
178
206
- name : Upload Libraries
179
207
uses : actions/upload-artifact@v2
@@ -203,8 +231,14 @@ jobs:
203
231
name : CEdev-${{runner.os}}
204
232
path : ${{github.workspace}}
205
233
- name : Extract Artifact Contents
206
- if : runner.os != 'Windows '
234
+ if : runner.os == 'Linux '
207
235
run : tar -xvf CEdev-${{runner.os}}.tar.gz
236
+ - name : Extract Artifact Contents
237
+ if : runner.os == 'macOS'
238
+ run : |
239
+ hdiutil attach CEdev-${{runner.os}}.dmg
240
+ cp -a "/Volumes/CE Programming Toolchain/CEdev" ./
241
+ umount "/Volumes/CE Programming Toolchain"
208
242
- name : Extract Artifact Contents
209
243
if : runner.os == 'Windows'
210
244
run : |
@@ -373,6 +407,11 @@ jobs:
373
407
with :
374
408
name : CEdev-Windows
375
409
path : ${{github.workspace}}
410
+ - name : Download CEdev macOS
411
+ uses : actions/download-artifact@v3
412
+ with :
413
+ name : CEdev-macOS
414
+ path : ${{github.workspace}}
376
415
- name : Download CE Libraries
377
416
uses : actions/download-artifact@v3
378
417
with :
@@ -383,6 +422,7 @@ jobs:
383
422
run : |
384
423
mv CEdev-Linux.tar.gz CEdev-Linux-nightly.tar.gz
385
424
mv CEdev-Windows.zip CEdev-Windows-nightly.zip
425
+ mv CEdev-macOS.dmg CEdev-macOS-nightly.dmg
386
426
mv clibs.8xg clibs-nightly.8xg
387
427
388
428
- name : Update nightly release
@@ -394,19 +434,5 @@ jobs:
394
434
files : |
395
435
CEdev-Linux-nightly.tar.gz
396
436
CEdev-Windows-nightly.zip
437
+ CEdev-macOS-nightly.dmg
397
438
clibs-nightly.8xg
398
-
399
- nightly-macos :
400
- runs-on : macos-latest
401
- needs : test
402
- if : github.event_name == 'push' && github.ref == 'refs/heads/master'
403
-
404
- steps :
405
- - name : Install create-dmg
406
- run : brew install create-dmg
407
-
408
- - name : Download CEdev Mac
409
- uses : actions/download-artifact@v3
410
- with :
411
- name : CEdev-macOS
412
- path : ${{github.workspace}}
0 commit comments