@@ -50,21 +50,26 @@ jobs:
50
50
AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
51
51
IS_NIGHTLY : ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') }}
52
52
IS_RELEASE : ${{ startsWith(github.ref, 'refs/tags/') }}
53
+ IS_FORK : ${{ github.actor != 'arduino' }}
53
54
run : |
54
55
# See: https://www.electron.build/code-signing
55
- if [ "${{ runner.OS }}" = "macOS" ]; then
56
- export CSC_LINK="${{ runner.temp }}/signing_certificate.p12"
57
- # APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from:
58
- # https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate
59
- echo "${{ secrets.APPLE_SIGNING_CERTIFICATE_P12 }}" | base64 --decode > "$CSC_LINK"
60
-
61
- export CSC_KEY_PASSWORD="${{ secrets.KEYCHAIN_PASSWORD }}"
62
-
63
- elif [ "${{ runner.OS }}" = "Windows" ]; then
64
- export CSC_LINK="${{ runner.temp }}/signing_certificate.pfx"
65
- echo "${{ secrets.WINDOWS_SIGNING_CERTIFICATE_PFX }}" | base64 --decode > "$CSC_LINK"
66
-
67
- export CSC_KEY_PASSWORD="${{ secrets.WINDOWS_SIGNING_CERTIFICATE_PASSWORD }}"
56
+ if [ $IS_FORK = true ]; then
57
+ echo "Skipping the app signing: building from a fork."
58
+ else
59
+ if [ "${{ runner.OS }}" = "macOS" ]; then
60
+ export CSC_LINK="${{ runner.temp }}/signing_certificate.p12"
61
+ # APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from:
62
+ # https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate
63
+ echo "${{ secrets.APPLE_SIGNING_CERTIFICATE_P12 }}" | base64 --decode > "$CSC_LINK"
64
+
65
+ export CSC_KEY_PASSWORD="${{ secrets.KEYCHAIN_PASSWORD }}"
66
+
67
+ elif [ "${{ runner.OS }}" = "Windows" ]; then
68
+ export CSC_LINK="${{ runner.temp }}/signing_certificate.pfx"
69
+ echo "${{ secrets.WINDOWS_SIGNING_CERTIFICATE_PFX }}" | base64 --decode > "$CSC_LINK"
70
+
71
+ export CSC_KEY_PASSWORD="${{ secrets.WINDOWS_SIGNING_CERTIFICATE_PASSWORD }}"
72
+ fi
68
73
fi
69
74
70
75
yarn --cwd ./electron/packager/
@@ -120,7 +125,7 @@ jobs:
120
125
121
126
publish :
122
127
needs : changelog
123
- if : github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')
128
+ if : github.actor != 'arduino' && (github. event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') )
124
129
runs-on : ubuntu-latest
125
130
steps :
126
131
- name : Download [GitHub Actions]
@@ -141,7 +146,7 @@ jobs:
141
146
142
147
release :
143
148
needs : changelog
144
- if : startsWith(github.ref, 'refs/tags/')
149
+ if : github.actor != 'arduino' && startsWith(github.ref, 'refs/tags/')
145
150
runs-on : ubuntu-latest
146
151
steps :
147
152
- name : Download [GitHub Actions]
0 commit comments