Skip to content

Commit ea1f013

Browse files
os-zhuangCopilot
andcommitted
ci(one): only notarize when APPLE_ID + APPLE_PASSWORD are non-empty
Tauri triggers notarization whenever the env vars are defined, even if their values are empty strings (as produced by an unset GitHub secret). Unset them at the shell level when empty so the build degrades to sign-only instead of failing with 401. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4e21cd8 commit ea1f013

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/one.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,16 @@ jobs:
132132
# macOS notarization (only triggered if APPLE_ID + APPLE_PASSWORD are set).
133133
APPLE_ID: ${{ secrets.APPLE_ID }}
134134
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
135-
run: pnpm --filter @objectos/one tauri build --target ${{ matrix.target }}
135+
shell: bash
136+
run: |
137+
set -euo pipefail
138+
# Tauri treats any defined APPLE_ID/APPLE_PASSWORD as a request to
139+
# notarize; unset them when empty so we just sign without notarizing.
140+
if [ -z "${APPLE_ID:-}" ] || [ -z "${APPLE_PASSWORD:-}" ]; then
141+
unset APPLE_ID APPLE_PASSWORD
142+
echo "APPLE_ID/APPLE_PASSWORD not set — will sign without notarization."
143+
fi
144+
pnpm --filter @objectos/one tauri build --target ${{ matrix.target }}
136145
137146
- name: Upload artifacts
138147
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)