···114114- Automatically commit your changes and your changes only. Do not use `git add .`
115115- Before you go on your task, check the current git branch name, if it's something generic like an animal name, name it accordingly. Do not do this for main branch
116116- After implementing an execplan, always submit a PR if you're not in the main branch
117117+- Fork releases must be notarized. Never publish non-notarized releases (`ENABLE_NOTARIZATION=0` is forbidden).
117118118119## Submodules
119120
+2-2
doc-onevcat/fork-sync-and-release.md
···80804) Zip app bundle.
81815) Create tag and upload zip to your fork GitHub Release page.
82828383-If you want the old behavior (no notarization), set `ENABLE_NOTARIZATION=0`.
8383+Non-notarized publishing is intentionally disabled for this fork.
84848585## Helper Scripts
8686···8989 - Default target repo: auto-detected from `origin`
9090 - Override target repo: `GH_REPO=owner/repo`
9191 - Release create fallback: if `gh release create` fails (for example token scope mismatch), script falls back to `gh api` and then uploads assets
9292- - Notarization: enabled by default (`ENABLE_NOTARIZATION=1`)
9292+ - Notarization: mandatory (the script exits if `ENABLE_NOTARIZATION!=1`)
9393 - Default keychain profile name: `supacode-notary` (override with `APPLE_NOTARY_KEYCHAIN_PROFILE`)
94949595### Example
+23-20
doc-onevcat/scripts/release-to-fork.sh
···169169SHORT_SHA="$(git rev-parse --short HEAD)"
170170DEFAULT_TAG="onevcat-v$(date +%Y.%m.%d)-${SHORT_SHA}"
171171TAG="${1:-$DEFAULT_TAG}"
172172-ENABLE_NOTARIZATION="${ENABLE_NOTARIZATION:-1}"
173172KEYCHAIN_PROFILE="${APPLE_NOTARY_KEYCHAIN_PROFILE:-supacode-notary}"
174173SIGNING_IDENTITY="${APPLE_SIGNING_IDENTITY:-}"
175174TEAM_ID_INPUT="${APPLE_TEAM_ID:-}"
176175APPLE_ID_INPUT="${APPLE_ID:-}"
177176APPLE_PASSWORD_INPUT="${APPLE_PASSWORD:-}"
177177+178178+if [[ "${ENABLE_NOTARIZATION:-1}" != "1" ]]; then
179179+ echo "error: publishing non-notarized releases is forbidden for this fork"
180180+ echo "error: remove ENABLE_NOTARIZATION=0 and provide notarization credentials"
181181+ exit 1
182182+fi
183183+ENABLE_NOTARIZATION="1"
178184179185echo "[release] repository: ${REPO}"
180186echo "[release] tag: ${TAG}"
···203209ZIP_PATH="build/${PRODUCT_NAME%.app}-${TAG}.app.zip"
204210NOTES_PATH="build/release-notes-${TAG}.md"
205211SUBMISSION_ZIP="build/notary-submit-${TAG}.app.zip"
206206-BUILD_TYPE="Debug (unsigned)"
212212+BUILD_TYPE="Debug (Developer ID signed + notarized)"
207213208208-if [[ "${ENABLE_NOTARIZATION}" == "1" ]]; then
209209- if ! command -v xcrun >/dev/null 2>&1; then
210210- echo "error: xcrun is required for notarization"
211211- exit 1
212212- fi
213213- if ! command -v codesign >/dev/null 2>&1; then
214214- echo "error: codesign is required for notarization"
215215- exit 1
216216- fi
217217- if [[ -z "$SIGNING_IDENTITY" ]]; then
218218- SIGNING_IDENTITY="$(default_signing_identity || true)"
219219- fi
220220- if [[ -z "$SIGNING_IDENTITY" ]]; then
221221- echo "error: APPLE_SIGNING_IDENTITY is not set and no Developer ID Application identity was found"
222222- exit 1
223223- fi
224224- sign_and_notarize_app "${APP_PATH}" "${SUBMISSION_ZIP}"
225225- BUILD_TYPE="Debug (Developer ID signed + notarized)"
214214+if ! command -v xcrun >/dev/null 2>&1; then
215215+ echo "error: xcrun is required for notarization"
216216+ exit 1
217217+fi
218218+if ! command -v codesign >/dev/null 2>&1; then
219219+ echo "error: codesign is required for notarization"
220220+ exit 1
221221+fi
222222+if [[ -z "$SIGNING_IDENTITY" ]]; then
223223+ SIGNING_IDENTITY="$(default_signing_identity || true)"
224224+fi
225225+if [[ -z "$SIGNING_IDENTITY" ]]; then
226226+ echo "error: APPLE_SIGNING_IDENTITY is not set and no Developer ID Application identity was found"
227227+ exit 1
226228fi
229229+sign_and_notarize_app "${APP_PATH}" "${SUBMISSION_ZIP}"
227230228231echo "[release] package ${APP_PATH} -> ${ZIP_PATH}"
229232ditto -c -k --sequesterRsrc --keepParent "${APP_PATH}" "${ZIP_PATH}"