@@ -20,10 +20,13 @@ jobs:
20
20
config :
21
21
- os : windows-2016
22
22
- os : ubuntu-latest
23
- - os : turin-macmini # self-hosted macOS
23
+ - os : macos-latest
24
24
# - os: rsora-rpi-arm # self-hosted armhf
25
25
runs-on : ${{ matrix.config.os }}
26
26
timeout-minutes : 30
27
+ env :
28
+ CERTIFICATE_PATH : /tmp/macos_signing_certificate.p12
29
+
27
30
steps :
28
31
- name : Checkout
29
32
uses : actions/checkout@v2
@@ -39,12 +42,12 @@ jobs:
39
42
with :
40
43
python-version : ' 2.7'
41
44
42
- - name : Update Keychain [macOS]
45
+ - name : Generate signing certificate file [macOS]
43
46
if : runner.OS == 'macOS'
44
47
run : |
45
- echo "${{ secrets.KEYCHAIN }}" | base64 --decode > ~/Library/Keychains/apple-developer.keychain-db
46
- security list-keychains -s ~/Library/Keychains/apple- developer.keychain-db
47
- security unlock-keychain -p "${{ secrets.KEYCHAIN_PASSWORD }}" ~/Library/Keychains/apple-developer.keychain-db
48
+ # APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from:
49
+ # https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the- developer-certificate
50
+ echo "${{ secrets.APPLE_SIGNING_CERTIFICATE_P12 }}" | base64 --decode > "${{ env.CERTIFICATE_PATH }}"
48
51
49
52
- name : Package
50
53
shell : bash
58
61
IS_NIGHTLY : ${{ github.event_name == 'schedule' }}
59
62
IS_RELEASE : ${{ startsWith(github.ref, 'refs/tags/') }}
60
63
run : |
64
+ # electron-builder will try to sign during the Windows job if these environment variables are defined
65
+ if [ "${{ runner.OS }}" = "macOS" ]; then
66
+ # See: https://www.electron.build/code-signing
67
+ export CSC_LINK="${{ env.CERTIFICATE_PATH }}"
68
+ export CSC_KEY_PASSWORD="${{ secrets.KEYCHAIN_PASSWORD }}"
69
+ fi
61
70
yarn --cwd ./electron/packager/
62
71
yarn --cwd ./electron/packager/ package
63
72
0 commit comments