Skip to content

Commit a47a3e4

Browse files
committed
Notarize macOS builds
1.0.10 Fix build variables 1.0.11 Remove teamID to fix notarization 1.0.12 Fix notarization option again Sorry folks, this isn't well documented. 1.0.13 Add hardenedRuntime option to macOS 1.0.14 Fix patch app-builder-lib with a working API notarization path
1 parent e71647e commit a47a3e4

File tree

5 files changed

+62
-6
lines changed

5 files changed

+62
-6
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
workflow_dispatch:
55
inputs:
66
newversion:
7-
description: 'npm version {major,minor,patch}'
7+
description: "npm version {major,minor,patch}"
88
required: true
99

1010
env:
11-
node_version: 'lts/*'
11+
node_version: "lts/*"
1212
FORCE_COLOR: 1
1313

1414
concurrency: # prevent concurrent releases
@@ -75,13 +75,22 @@ jobs:
7575
if: matrix.os != 'macos-latest'
7676
env:
7777
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use.
78+
- name: Prep signing files
79+
if: matrix.os == 'macos-latest'
80+
run: |
81+
echo "$APPLE_API_KEY_B64" | base64 -d > /tmp/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8
82+
env:
83+
APPLE_API_KEY_B64: ${{ secrets.APPLE_API_KEY_B64 }}
7884
- name: Build signed
7985
run: npm run pkg
8086
if: matrix.os == 'macos-latest'
8187
env:
8288
CSC_LINK: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION }}
8389
CSC_KEY_PASSWORD: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_PASSWORD }}
8490
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # built in actions token. Passed tp gh-release if in use.
91+
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
92+
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
93+
APPLE_API_KEY: "/tmp/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8"
8594
- name: Archive lockfile
8695
uses: actions/upload-artifact@v4
8796
with:

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=true

CHANGELOG.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
99

10-
## [v1.0.9](https://github.com/hypermodules/hyperamp/compare/v1.0.8...v1.0.9)
10+
## [v1.0.14](https://github.com/hypermodules/hyperamp/compare/v1.0.13...v1.0.14)
11+
12+
### Commits
13+
14+
- Add hardenedRuntime option to macOS [`9d45ba6`](https://github.com/hypermodules/hyperamp/commit/9d45ba649c8f62807bb7bbe8db150fcf3d2ef1b9)
15+
16+
## [v1.0.13](https://github.com/hypermodules/hyperamp/compare/v1.0.12...v1.0.13) - 2023-12-19
17+
18+
### Commits
19+
20+
- Fix notarization option again [`cf30c80`](https://github.com/hypermodules/hyperamp/commit/cf30c80c539a2739dde68c0bdff5f014b5b82668)
21+
22+
## [v1.0.12](https://github.com/hypermodules/hyperamp/compare/v1.0.11...v1.0.12) - 2023-12-19
23+
24+
### Commits
25+
26+
- Remove teamID to fix notarization [`277b598`](https://github.com/hypermodules/hyperamp/commit/277b5988adfb39b4deb413c40a818336588ee081)
27+
28+
## [v1.0.11](https://github.com/hypermodules/hyperamp/compare/v1.0.10...v1.0.11) - 2023-12-19
29+
30+
### Commits
31+
32+
- Fix build variables [`acaac28`](https://github.com/hypermodules/hyperamp/commit/acaac28b28a599fcfec2d0fb372dbce9dd784075)
33+
34+
## [v1.0.10](https://github.com/hypermodules/hyperamp/compare/v1.0.9...v1.0.10) - 2023-12-18
35+
36+
### Commits
37+
38+
- Notarize macOS builds [`ce59f1a`](https://github.com/hypermodules/hyperamp/commit/ce59f1a983f5d777b5e0113e9cafc28a951c5716)
39+
40+
## [v1.0.9](https://github.com/hypermodules/hyperamp/compare/v1.0.8...v1.0.9) - 2023-12-17
1141

1242
### Merged
1343

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
],
2828
"mac": {
2929
"category": "public.app-category.music",
30+
"appId": "com.hypermodules.hyperamp",
31+
"notarize": true,
32+
"hardenedRuntime": true,
3033
"target": [
3134
{
3235
"target": "dmg",
@@ -95,6 +98,7 @@
9598
"nanobus": "^4.4.0",
9699
"nanocomponent": "^6.5.2",
97100
"nanologger": "^2.0.0",
101+
"patch-package": "^8.0.0",
98102
"pump": "^3.0.0",
99103
"through2-filter": "^3.0.0",
100104
"xtend": "^4.0.2"
@@ -108,7 +112,6 @@
108112
"bundle-collapser": "^1.3.0",
109113
"common-shakeify": "^1.1.2",
110114
"concat-stream": "^2.0.0",
111-
"dependency-check": "^4.1.0",
112115
"electron": "^28.0.0",
113116
"electron-builder": "^24.4.0",
114117
"electron-renderify": "0.0.2",
@@ -158,7 +161,6 @@
158161
"start": "run-s watch",
159162
"test": "run-s test:*",
160163
"test-skip:tape": "xvfb-maybe tape test/* | tap-format-spec",
161-
"test:deps": "dependency-check ./package.json renderer/player/index.js renderer/audio/index.js --no-dev --ignore-module electron",
162164
"test:lint": "standard | snazzy",
163165
"test:main": "tape main/lib/**/test.js | tap-format-spec",
164166
"test:renderer": "tape renderer/**/test.js | tap-format-spec",
@@ -168,6 +170,7 @@
168170
"version": "run-s version:*",
169171
"version:changelog": "auto-changelog -p --template keepachangelog auto-changelog --breaking-pattern 'BREAKING CHANGE:'",
170172
"version:git": "git add CHANGELOG.md",
171-
"release": "git push --follow-tags && gh-release -y"
173+
"release": "git push --follow-tags && gh-release -y",
174+
"postinstall": "patch-package"
172175
}
173176
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/node_modules/app-builder-lib/out/macPackager.js b/node_modules/app-builder-lib/out/macPackager.js
2+
index 98ca598..107a786 100644
3+
--- a/node_modules/app-builder-lib/out/macPackager.js
4+
+++ b/node_modules/app-builder-lib/out/macPackager.js
5+
@@ -459,7 +459,7 @@ class MacPackager extends platformPackager_1.PlatformPackager {
6+
return proj;
7+
}
8+
const { teamId } = options;
9+
- if (teamId && (legacyLogin || notaryToolLogin)) {
10+
+ if ((teamId || options === true) && (legacyLogin || notaryToolLogin)) {
11+
const proj = {
12+
appPath,
13+
...(legacyLogin !== null && legacyLogin !== void 0 ? legacyLogin : notaryToolLogin),

0 commit comments

Comments
 (0)