Skip to content

Commit

Permalink
Drop electron-notarize dependency in favor of @electron/notarize
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
myarmolinsky committed Jun 28, 2023
1 parent 51c050c commit 10b5af6
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 55 deletions.
13 changes: 7 additions & 6 deletions .github/actions/publish/action.yml
Expand Up @@ -3,29 +3,29 @@ name: package and draft GitHub release
# https://github.com/product-os/flowzone/tree/master/.github/actions
inputs:
json:
description: "JSON stringified object containing all the inputs from the calling workflow"
description: 'JSON stringified object containing all the inputs from the calling workflow'
required: true
secrets:
description: "JSON stringified object containing all the secrets from the calling workflow"
description: 'JSON stringified object containing all the secrets from the calling workflow'
required: true
variables:
description: "JSON stringified object containing all the variables from the calling workflow"
description: 'JSON stringified object containing all the variables from the calling workflow'
required: true

# --- custom environment
XCODE_APP_LOADER_EMAIL:
type: string
default: "accounts+apple@balena.io"
default: 'accounts+apple@balena.io'
NODE_VERSION:
type: string
default: '16.x'
VERBOSE:
type: string
default: "true"
default: 'true'

runs:
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
using: "composite"
using: 'composite'
steps:
- name: Download custom source artifact
uses: actions/download-artifact@v3
Expand Down Expand Up @@ -124,6 +124,7 @@ runs:
# Apple notarization (automation/build-bin.ts)
XCODE_APP_LOADER_EMAIL: ${{ inputs.XCODE_APP_LOADER_EMAIL }}
XCODE_APP_LOADER_PASSWORD: ${{ fromJSON(inputs.secrets).XCODE_APP_LOADER_PASSWORD }}
XCODE_APP_LOADER_TEAM_ID: ${{ fromJSON(inputs.secrets).XCODE_APP_LOADER_TEAM_ID }}

- name: Upload artifacts
uses: actions/upload-artifact@v3
Expand Down
11 changes: 6 additions & 5 deletions automation/build-bin.ts
Expand Up @@ -465,16 +465,17 @@ async function signWindowsInstaller() {
* Wait for Apple Installer Notarization to continue
*/
async function notarizeMacInstaller(): Promise<void> {
const teamId = process.env.XCODE_APP_LOADER_TEAM_ID;
const appleId =
process.env.XCODE_APP_LOADER_EMAIL || 'accounts+apple@balena.io';
const appBundleId = packageJSON.oclif.macos.identifier || 'io.balena.cli';
const appleIdPassword = process.env.XCODE_APP_LOADER_PASSWORD;

if (appleIdPassword) {
const { notarize } = await import('electron-notarize');
// https://github.com/electron/notarize/blob/main/README.md
if (appleIdPassword && teamId) {
const { notarize } = await import('@electron/notarize');
// https://github.com/electron/notarize#readme
await notarize({
appBundleId,
tool: 'notarytool',
teamId,
appPath: renamedOclifInstallers.darwin,
appleId,
appleIdPassword,
Expand Down
85 changes: 42 additions & 43 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -114,6 +114,7 @@
},
"devDependencies": {
"@balena/lint": "^6.2.2",
"@electron/notarize": "^2.0.0",
"@oclif/config": "^1.18.2",
"@oclif/parser": "^3.8.6",
"@octokit/plugin-throttling": "^3.5.1",
Expand Down Expand Up @@ -170,7 +171,6 @@
"cross-env": "^7.0.3",
"deep-object-diff": "^1.1.0",
"diff": "^5.0.0",
"electron-notarize": "^1.0.0",
"ent": "^2.2.0",
"filehound": "^1.17.5",
"fs-extra": "^9.1.0",
Expand Down

0 comments on commit 10b5af6

Please sign in to comment.