forked from prusa3d/PrusaSlicer
-
-
Notifications
You must be signed in to change notification settings - Fork 522
72 lines (68 loc) · 3.1 KB
/
ccpp_mac_rc.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
name: C/C++ Release candidate macos
on:
push:
branches:
- rc
- debug_macos
jobs:
build:
runs-on: macos-11
steps:
- uses: actions/checkout@v2
with:
ref: 'rc'
- name: build deps & slicer
run: ./BuildMacOS.sh
- name: copy zstd
run: cp /usr/local/opt/zstd/lib/libzstd.1.dylib ./build/pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/libzstd.1.dylib
- name: relink zstd
run: install_name_tool -change /usr/local/opt/zstd/lib/libzstd.1.dylib @executable_path/libzstd.1.dylib ./build/pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
- name: Codesign executable conf
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_P12 }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_PASSWD }}
MACOS_APP: ${{ secrets.MAC_APP_PWD }}
run: |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p temp_password build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p temp_password build.keychain
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
- name: verify certificate presence
run: security find-identity -v
- name: register codesign
run: |
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k temp_password build.keychain
- name: run codesign on exe
run: |
/usr/bin/codesign --options=runtime --force -s "Developer ID Application: Remi Durand (LDTLFRHP3G)" ./build/pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer -v
codesign -vvv --deep --strict ./build/pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
codesign -dvv ./build/pack/SuperSlicer/SuperSlicer.app/Contents/MacOS/SuperSlicer
- name: create the dmg
run: |
hdiutil create -ov -fs HFS+ -volname SuperSlicer -srcfolder "build/pack/SuperSlicer" temp.dmg
hdiutil convert temp.dmg -format UDZO -o SuperSlicer.dmg
- name: run codesign on the dmg
run: |
/usr/bin/codesign -s "Developer ID Application: Remi Durand (LDTLFRHP3G)" SuperSlicer.dmg -v
codesign -vvv --deep --strict SuperSlicer.dmg
codesign -dvv SuperSlicer.dmg
- name: notarize the dmg
run: |
xcrun altool --notarize-app -f SuperSlicer.dmg --primary-bundle-id org.slic3r.superslicer -u [email protected] -p $MACOS_APP
spctl -a -t open --context context:primary-signature -v SuperSlicer.dmg
- name: run codesign on app
run: |
/usr/bin/codesign --force -s "Developer ID Application: Remi Durand (LDTLFRHP3G)" ./build/pack/SuperSlicer/SuperSlicer.app -v
codesign -vvv --deep --strict ./build/pack/SuperSlicer/SuperSlicer.app
codesign -dvv ./build/pack/SuperSlicer/SuperSlicer.app
- name: Upload artifact
uses: actions/[email protected]
with:
name: rc_macos.app
path: build/pack/SuperSlicer/SuperSlicer.app
- name: Upload artifact
uses: actions/[email protected]
with:
name: rc_macos.dmg
path: build/SuperSlicer.dmg