indygreg / indygreg/apple-code-sign-action

Cannot notarize: Action expects API key file, not API key string

Open
#76 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
58
Forks
12
PR merge metrics
No merged PRs in 30d

Description

I tried to notarize like this (like in the bottom of [README.md](https://github.com/indygreg/apple-code-sign-action/blob/a00d97f64dc70cb0e9bbc1e5f13d1892dd1c333a/README.md?plain=1#L128-L149)):
```yaml
- name: Sign and notarize macOS Bundle
uses: indygreg/apple-code-sign-action@v1
with:
input_path: MyApp.app
sign: true
notarize: true
staple: true
p12_file: cert.p12
p12_password: ${{ secrets.certificate_password }}
app_store_connect_api_issuer: 'abcdef-42-2411312...'
app_store_connect_api_key: 'DEADBEEF'
```
But am seeing this error despite providing `app_store_connect_api_key`:
```
Error: App Store Connect API Key not defined; cannot notarize
```

This appears to be from here:
https://github.com/indygreg/apple-code-sign-action/blob/a00d97f64dc70cb0e9bbc1e5f13d1892dd1c333a/src/main.js#L151-L155

It seems that it is failing if the key is provided as a string instead of through the encoded JSON file. Additionally, the error message does not imply that the JSON encoded version is specifically required.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the notarization input handling in src/main.js around lines 151-155, then compare it with the README.md example at lines 128-149. Reproduce the YAML configuration using a string API key and make the accepted input or the required JSON-file error explicit; verify the resulting notarization validation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
ci-cd
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.