Skip to content

Commit

Permalink
Merge pull request #311 from vechain/dev
Browse files Browse the repository at this point in the history
update notarize tools
  • Loading branch information
libotony authored Jun 30, 2023
2 parents a798eed + eff824c commit b45e507
Show file tree
Hide file tree
Showing 6 changed files with 139 additions and 140 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ jobs:
- name: Setup macOS Notarization env
run: |
rm -fr ~/private_keys && mkdir ~/private_keys
echo $APPLE_AUTH_PRIVATE_KEY | base64 -D > ~/private_keys/AuthKey_${APPLE_API_KEY}.p8
echo $APPLE_AUTH_PRIVATE_KEY | base64 -D > ~/private_keys/AuthKey_${APPLE_API_KEY_ID}.p8
env:
APPLE_AUTH_PRIVATE_KEY: ${{secrets.APPLE_AUTH_PRIVATE_KEY}}
APPLE_API_KEY: ${{secrets.APPLE_API_KEY}}
APPLE_API_KEY_ID: ${{secrets.APPLE_API_KEY_ID}}

- name: Build and Release
run: npx quasar build -m electron
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}

release-android:
Expand Down
2 changes: 0 additions & 2 deletions build/entitlements.mac.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
Expand Down
11 changes: 6 additions & 5 deletions build/notarize.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { notarize } = require('electron-notarize')
const { notarize } = require('@electron/notarize')

exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context
Expand All @@ -8,20 +8,21 @@ exports.default = async function notarizing(context) {
return
}

if (!(process.env.APPLE_API_KEY && process.env.APPLE_API_ISSUER)) {
if (!(process.env.APPLE_API_KEY_ID && process.env.APPLE_API_ISSUER)) {
console.warn(
'Skipping macOS app notarization.' +
' Missing one or more environment vars (APPLE_API_KEY, APPLE_API_ISSUER).'
' Missing one or more environment vars (APPLE_API_KEY_ID, APPLE_API_ISSUER).'
)
return
}

const appName = context.packager.appInfo.productFilename

return await notarize({
appBundleId: 'org.vechain.sync',
tool: 'notarytool',
appPath: `${appOutDir}/${appName}.app`,
appleApiKey: process.env.APPLE_API_KEY,
appleApiKey: `~/private_keys/AuthKey_${process.env.APPLE_API_KEY_ID}.p8`,
appleApiKeyId: process.env.APPLE_API_KEY_ID,
appleApiIssuer: process.env.APPLE_API_ISSUER
})
}
257 changes: 128 additions & 129 deletions package-lock.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
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"node-hid": "^2.1.1"
},
"devDependencies": {
"@electron/notarize": "^2.0.0",
"@electron/remote": "^1.0.4",
"@ledgerhq/hw-transport-node-hid-noevents": "^5.46.0",
"@ledgerhq/hw-transport-webhid": "^5.46.0",
Expand All @@ -44,7 +45,6 @@
"electron-builder": "^22.10.5",
"electron-debug": "^3.0.1",
"electron-devtools-installer": "^2.2.4",
"electron-notarize": "^1.0.0",
"electron-rebuild": "^2.3.5",
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.0",
Expand Down
1 change: 1 addition & 0 deletions quasar.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ module.exports = configure(function (ctx) {
},
afterSign: "build/notarize.js",
mac: {
hardenedRuntime: true,
entitlements: "build/entitlements.mac.plist",
entitlementsInherit: "build/entitlements.mac.plist",
target: {
Expand Down

0 comments on commit b45e507

Please sign in to comment.