|
35 | 35 | - name: Install dependencies
|
36 | 36 | run: pip install cycode nuitka
|
37 | 37 |
|
38 |
| - - name: Build executable |
39 |
| - run: python -m nuitka --onefile --include-data-files=cycode/cli/config.yaml=cycode/cli/config.yaml --include-data-files=cycode/cyclient/config.yaml=cycode/cyclient/config.yaml --output-dir=dist cycode/cli/main.py |
40 |
| - |
41 |
| - - name: Test executable |
42 |
| - run: | |
43 |
| - cp dist/main.bin dist/cycode |
44 |
| - time ./dist/cycode version |
45 |
| -
|
46 |
| - - name: Sign macOS executable |
| 38 | + - name: Import macOS cert |
47 | 39 | if: runner.os == 'macOS'
|
48 | 40 | env:
|
49 | 41 | APPLE_CERT: ${{ secrets.APPLE_CERT }}
|
|
65 | 57 | security import $CERTIFICATE_PATH -P "$APPLE_CERT_PWD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
66 | 58 | security list-keychain -d user -s $KEYCHAIN_PATH
|
67 | 59 |
|
68 |
| - # sign executable |
69 |
| - codesign --deep --force --options=runtime --entitlements entitlements.plist --sign "$APPLE_CERT_NAME" --timestamp dist/cycode |
| 60 | + - name: Build executable |
| 61 | + env: |
| 62 | + APPLE_CERT_NAME: ${{ secrets.APPLE_CERT_NAME }} |
| 63 | + run: python -m nuitka --onefile --include-data-files=cycode/cli/config.yaml=cycode/cli/config.yaml --include-data-files=cycode/cyclient/config.yaml=cycode/cyclient/config.yaml --output-dir=out cycode/cli/main.py --macos-sign-identity "$APPLE_CERT_NAME" |
| 64 | + |
| 65 | + - name: Test executable |
| 66 | + run: | |
| 67 | + cp out/main.bin dist/cycode |
| 68 | + time ./dist/cycode version |
| 69 | +
|
| 70 | +# - name: Sign macOS executable |
| 71 | +# if: runner.os == 'macOS' |
| 72 | +# env: |
| 73 | +# APPLE_CERT: ${{ secrets.APPLE_CERT }} |
| 74 | +# APPLE_CERT_PWD: ${{ secrets.APPLE_CERT_PWD }} |
| 75 | +# APPLE_CERT_NAME: ${{ secrets.APPLE_CERT_NAME }} |
| 76 | +# APPLE_KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }} |
| 77 | +# run: | |
| 78 | +# # import certificate |
| 79 | +# CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 |
| 80 | +# echo -n "$APPLE_CERT" | base64 --decode -o $CERTIFICATE_PATH |
| 81 | +# |
| 82 | +# # create temporary keychain |
| 83 | +# KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db |
| 84 | +# security create-keychain -p "$APPLE_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH |
| 85 | +# security set-keychain-settings -lut 21600 $KEYCHAIN_PATH |
| 86 | +# security unlock-keychain -p "$APPLE_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH |
| 87 | +# |
| 88 | +# # import certificate to keychain |
| 89 | +# security import $CERTIFICATE_PATH -P "$APPLE_CERT_PWD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH |
| 90 | +# security list-keychain -d user -s $KEYCHAIN_PATH |
| 91 | +# |
| 92 | +# # sign executable |
| 93 | +# codesign --deep --force --options=runtime --entitlements entitlements.plist --sign "$APPLE_CERT_NAME" --timestamp dist/cycode |
70 | 94 |
|
71 | 95 | - name: Notarize macOS executable
|
72 | 96 | if: runner.os == 'macOS'
|
|
0 commit comments