Skip to content

Commit 7068b9b

Browse files
committed
Add signed Windows installer package to the "Arduino Pro IDE" workflow
The previous "zip" Windows package is retained, but an installer is also produced.
1 parent e755a1c commit 7068b9b

File tree

4 files changed

+35
-27
lines changed

4 files changed

+35
-27
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ jobs:
2525
# - os: rsora-rpi-arm # self-hosted armhf
2626
runs-on: ${{ matrix.config.os }}
2727
timeout-minutes: 90
28-
env:
29-
CERTIFICATE_PATH: /tmp/macos_signing_certificate.p12
3028

3129
steps:
3230
- name: Checkout
@@ -43,13 +41,6 @@ jobs:
4341
with:
4442
python-version: '2.7'
4543

46-
- name: Generate signing certificate file [macOS]
47-
if: runner.OS == 'macOS'
48-
run: |
49-
# APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from:
50-
# https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate
51-
echo "${{ secrets.APPLE_SIGNING_CERTIFICATE_P12 }}" | base64 --decode > "${{ env.CERTIFICATE_PATH }}"
52-
5344
- name: Package
5445
shell: bash
5546
env:
@@ -62,12 +53,22 @@ jobs:
6253
IS_NIGHTLY: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master') }}
6354
IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/') }}
6455
run: |
65-
# electron-builder will try to sign during the Windows job if these environment variables are defined
56+
# See: https://www.electron.build/code-signing
6657
if [ "${{ runner.OS }}" = "macOS" ]; then
67-
# See: https://www.electron.build/code-signing
68-
export CSC_LINK="${{ env.CERTIFICATE_PATH }}"
58+
export CSC_LINK="${{ runner.temp }}/signing_certificate.p12"
59+
# APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from:
60+
# https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate
61+
echo "${{ secrets.APPLE_SIGNING_CERTIFICATE_P12 }}" | base64 --decode > "$CSC_LINK"
62+
6963
export CSC_KEY_PASSWORD="${{ secrets.KEYCHAIN_PASSWORD }}"
64+
65+
elif [ "${{ runner.OS }}" = "Windows" ]; then
66+
export CSC_LINK="${{ runner.temp }}/signing_certificate.pfx"
67+
echo "${{ secrets.WINDOWS_SIGNING_CERTIFICATE_PFX }}" | base64 --decode > "$CSC_LINK"
68+
69+
export CSC_KEY_PASSWORD="${{ secrets.WINDOWS_SIGNING_CERTIFICATE_PASSWORD }}"
7070
fi
71+
7172
yarn --cwd ./electron/packager/
7273
yarn --cwd ./electron/packager/ package
7374

README.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@ You can download the latest version of the Arduino Pro IDE application for the s
88

99
#### Latest version
1010

11-
Platform | 32 bit | 64 bit |
12-
--------- | ------------------------ | ------------------------ |
13-
Linux | | [Linux 64 bit] |
14-
Linux ARM | [🚧 Work in progress...] | [🚧 Work in progress...] |
15-
Windows | | [Windows 64 bit] |
16-
macOS | | [macOS 64 bit] |
11+
Platform | 32 bit | 64 bit |
12+
--------- | ------------------------ | ---------------------------------------------------- |
13+
Linux | | [Linux 64 bit] |
14+
Linux ARM | [🚧 Work in progress...] | [🚧 Work in progress...] |
15+
Windows | | [Windows 64 bit installer]<br />[Windows 64 bit ZIP] |
16+
macOS | | [macOS 64 bit] |
1717

1818
[🚧 Work in progress...]: https://github.com/arduino/arduino-pro-ide/issues/287
1919
[Linux 64 bit]: https://downloads.arduino.cc/arduino-pro-ide/arduino-pro-ide_latest_Linux_64bit.zip
20-
[Windows 64 bit]: https://downloads.arduino.cc/arduino-pro-ide/arduino-pro-ide_latest_Windows_64bit.zip
20+
[Windows 64 bit installer]: https://downloads.arduino.cc/arduino-pro-ide/arduino-pro-ide_latest_Windows_64bit.exe
21+
[Windows 64 bit ZIP]: https://downloads.arduino.cc/arduino-pro-ide/arduino-pro-ide_latest_Windows_64bit.zip
2122
[macOS 64 bit]: https://downloads.arduino.cc/arduino-pro-ide/arduino-pro-ide_latest_macOS_64bit.dmg
2223

2324
#### Previous versions
@@ -30,16 +31,17 @@ These builds are generated every day at 03:00 GMT from the `master` branch and
3031
should be considered unstable. In order to get the latest nightly build
3132
available for the supported platform, use the following links:
3233

33-
Platform | 32 bit | 64 bit |
34-
--------- | ------------------------ | ------------------------ |
35-
Linux | | [Nightly Linux 64 bit] |
36-
Linux ARM | [🚧 Work in progress...] | [🚧 Work in progress...] |
37-
Windows | | [Nightly Windows 64 bit] |
38-
macOS | | [Nightly macOS 64 bit] |
34+
Platform | 32 bit | 64 bit |
35+
--------- | ------------------------ | -------------------------------------------------------------------- |
36+
Linux | | [Nightly Linux 64 bit] |
37+
Linux ARM | [🚧 Work in progress...] | [🚧 Work in progress...] |
38+
Windows | | [Nightly Windows 64 bit installer]<br />[Nightly Windows 64 bit ZIP] |
39+
macOS | | [Nightly macOS 64 bit] |
3940

4041
[🚧 Work in progress...]: https://github.com/arduino/arduino-pro-ide/issues/287
4142
[Nightly Linux 64 bit]: https://downloads.arduino.cc/arduino-pro-ide/nightly/arduino-pro-ide_nightly-latest_Linux_64bit.zip
42-
[Nightly Windows 64 bit]: https://downloads.arduino.cc/arduino-pro-ide/nightly/arduino-pro-ide_nightly-latest_Windows_64bit.zip
43+
[Nightly Windows 64 bit installer]: https://downloads.arduino.cc/arduino-pro-ide/nightly/arduino-pro-ide_nightly-latest_Windows_64bit.exe
44+
[Nightly Windows 64 bit ZIP]: https://downloads.arduino.cc/arduino-pro-ide/nightly/arduino-pro-ide_nightly-latest_Windows_64bit.zip
4345
[Nightly macOS 64 bit]: https://downloads.arduino.cc/arduino-pro-ide/nightly/arduino-pro-ide_nightly-latest_macOS_64bit.dmg
4446

4547
> These links return an HTTP `302: Found` response, redirecting to latest

electron/build/template-package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
],
7878
"win": {
7979
"target": [
80+
"nsis",
8081
"zip"
8182
]
8283
},
@@ -99,6 +100,10 @@
99100
"category": "Development",
100101
"icon": "resources/icons"
101102
},
103+
"nsis": {
104+
"oneClick": false,
105+
"allowToChangeInstallationDirectory": true
106+
},
102107
"dmg": {
103108
"icon": "resources/icon.icns",
104109
"iconSize": 128,

electron/packager/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ ${fs.readFileSync(path('..', 'build', 'package.json')).toString()}
280280
break;
281281
}
282282
case 'win32': {
283-
filesToCopy.push(...glob.sync('**/arduino-pro-ide*.zip', { cwd }).map(p => join(cwd, p)));
283+
filesToCopy.push(...glob.sync('**/arduino-pro-ide*.{exe,zip}', { cwd }).map(p => join(cwd, p)));
284284
break;
285285
}
286286
case 'darwin': {

0 commit comments

Comments
 (0)