action-electron-builder
action-electron-builder copied to clipboard
Notarization Error
I'm trying to do notarization in my github action, but for some reason I'm getting the following error:
my config (in the package.json)
"build": {
"dmg": {
"sign": false
},
"appId": "com.name.nameapp",
"publish": [
{
"owner": "OWNER",
"repo": "REPO-NAME",
"provider": "github",
"private": true
}
],
"asar": true,
"directories": {
"output": "release/${version}"
},
"files": [
"dist-electron",
"dist"
],
"afterSign": "electron-builder-notarize",
"mac": {
"notarize": {
"teamId": "APPLE_TEAM_ID" // hardcoded for now
},
"artifactName": "${productName}_${version}.${arch}.${ext}",
"entitlements": "./build/entitlements.mac.plist",
"entitlementsInherit": "./build/entitlements.mac.plist",
"target": [
"dmg",
"zip"
],
"hardenedRuntime": true
},
"win": {
"target": [
{
"target": "nsis",
"arch": [
"x64"
]
}
],
"artifactName": "${productName}_${version}.${ext}"
},
"nsis": {
"oneClick": false,
"perMachine": false,
"allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": false
},
"linux": {
"target": [
"AppImage"
],
"category": "Office"
}
}
yml action:
name: Build/release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-latest, ubuntu-latest, windows-latest]
os: [macos-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: 20.13.0
- name: Debug environment variables
run: env
- name: Debug GitHub Ref
run: echo "GITHUB_REF=${{ github.ref }}"
- name: Prepare for app notarization
if: startsWith(matrix.os, 'macos')
# Import Apple API key for app notarization on macOS
run: |
mkdir -p ~/private_keys/
echo '${{ secrets.API_KEY }}' > ~/private_keys/AuthKey_${{ secrets.API_KEY_ID }}.p8
- name: Build/release Electron app
uses: Yan-Jobs/[email protected]
with:
mac_certs: ${{ secrets.MAC_CERTS }}
mac_certs_password: ${{ secrets.MAC_CERTS_PASSWORD }}
# GitHub token, automatically provided to the action
# (No need to define this secret in the repo settings)
github_token: ${{ secrets.GITHUB_TOKEN }}
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
# macOS notarization API key
API_KEY_ID: ${{ secrets.API_KEY_ID }}
API_KEY_ISSUER_ID: ${{ secrets.API_KEY_ISSUER_ID }}
and those are the secret I set:
I'm not sure if any of the secrets I set is wrong but I'm pretty sure they should be correct