Skip to content

Split any YouTube song into stems

TypeScript

Fix mac bundle signing: Developer ID when available, ad-hoc fallback; CI cert via secrets

Daniel Ravina21e38e863e50
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index ec03072..18d5d14 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -55,12 +55,22 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
+ CSC_LINK: ${{ secrets.CSC_MAC_P12 }}
+ CSC_KEY_PASSWORD: ${{ secrets.CSC_MAC_PASSWORD }}
+ APPLE_ID: ${{ secrets.APPLE_ID }}
+ APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
+ APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: npx electron-builder --${{ matrix.platform }} --publish always
- name: Package (on demand)
if: github.event_name == 'workflow_dispatch'
env:
CSC_IDENTITY_AUTO_DISCOVERY: 'false'
+ CSC_LINK: ${{ secrets.CSC_MAC_P12 }}
+ CSC_KEY_PASSWORD: ${{ secrets.CSC_MAC_PASSWORD }}
+ APPLE_ID: ${{ secrets.APPLE_ID }}
+ APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
+ APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: npx electron-builder --${{ matrix.platform }} --publish never
- name: Upload artifacts
diff --git a/README.md b/README.md
index e5081cd..cd71540 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,9 @@ Grab installers from [Releases](https://github.com/danielravina/stemkit/releases
First launch creates a private Python environment and downloads the separation engine (~2 GB, one time) plus model weights (~80 MB). ffmpeg is bundled — nothing else to install.
-> Unsigned builds: macOS requires right-click → Open on first run; Windows SmartScreen shows a warning.
+> **macOS first launch**: builds are signed with a Developer ID but not notarized, so macOS may say it "cannot verify the developer". One-time fix: **System Settings → Privacy & Security → Open Anyway** (or `xattr -cr /Applications/StemKit.app`).
+>
+> **Windows**: SmartScreen may warn on first run — "More info → Run anyway".
## Requirements
@@ -56,6 +58,20 @@ Releases are built by GitHub Actions:
- push a tag `v*` → binaries attach to a draft GitHub Release
- `workflow_dispatch` ("Run workflow") → on-demand artifacts on the run page
+macOS builds are Developer-ID-signed automatically when the cert is available in the CI/agent keychain. To also **notarize** (removes the one-time "Open Anyway" step), add repo secrets `APPLE_ID` + `APPLE_APP_SPECIFIC_PASSWORD` — electron-builder picks them up automatically.
+
+### Signing in CI (one-time setup)
+
+Local builds sign with your keychain cert automatically. CI runners have empty keychains, so hand them the certificate via repo **secrets**:
+
+1. Keychain Access → My Certificates → right-click `Developer ID Application: ...` → Export → `.p12` (set an export password)
+2. Base64 it and add these repo secrets:
+ - `CSC_MAC_P12` — the base64 string: `base64 -i developer-id.p12 | pbcopy`
+ - `CSC_MAC_PASSWORD` — the export password from step 1
+3. Optional (full notarization, zero Gatekeeper prompts): also add `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, `APPLE_TEAM_ID`
+
+Without these secrets CI falls back to ad-hoc signing (app runs, but Gatekeeper complains on download).
+
## How it works
```
diff --git a/electron-builder.yml b/electron-builder.yml
index 11d9357..82ce07f 100644
--- a/electron-builder.yml
+++ b/electron-builder.yml
@@ -12,7 +12,6 @@ extraResources:
mac:
category: public.app-category.music
icon: build/icon.png
- identity: null
target:
- target: dmg
arch:
diff --git a/package.json b/package.json
index 52df501..6eed2c8 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "stemkit",
"productName": "StemKit",
- "version": "0.1.0",
+ "version": "0.1.1",
"description": "Local YouTube stem splitter and player",
"main": "./out/main/index.js",
"author": "daniel",