diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..11d68cf7 --- /dev/null +++ b/.env.example @@ -0,0 +1,13 @@ +# Prowl release environment variables +# Copy to .env and fill in values. .env is gitignored. + +# Apple code signing (auto-detected if unset) +# APPLE_SIGNING_IDENTITY=Developer ID Application: Your Name (TEAM_ID) +# APPLE_TEAM_ID=TEAM_ID +# APPLE_NOTARY_KEYCHAIN_PROFILE=supacode-notary + +# Sparkle EdDSA private key (default: ~/.prowl-sparkle-private-key) +# SPARKLE_PRIVATE_KEY_FILE=~/.prowl-sparkle-private-key + +# Netlify Build Hook for Prowl-Site rebuild after release +NETLIFY_BUILD_HOOK= diff --git a/doc-onevcat/fork-sync-and-release.md b/doc-onevcat/fork-sync-and-release.md index 28b3833d..ad9828d5 100644 --- a/doc-onevcat/fork-sync-and-release.md +++ b/doc-onevcat/fork-sync-and-release.md @@ -12,10 +12,10 @@ Date-based versioning: `YYYY.M.DD` (e.g., `2026.3.18`). Same-day collisions appe ### Sparkle Auto-Update -- Feed URL: `https://prowl.onev.cat/appcast.xml` (hosted via Prowl-Site on Netlify) +- Feed URL: `https://github.com/onevcat/Prowl/releases/latest/download/appcast.xml` (hosted as a GitHub Release asset) - EdDSA public key configured in `supacode/Info.plist` as `SUPublicEDKey` - Private key stored in macOS Keychain and exported to `~/.prowl-sparkle-private-key` -- Appcast generated by `bins/generate_appcast` during release +- Appcast generated by `bins/generate_appcast` during release and uploaded to the GitHub Release ### Release Artifacts @@ -77,8 +77,7 @@ The script handles: 4. DMG creation with signing 5. Notarization + stapling 6. Sparkle appcast generation -7. GitHub Release with all artifacts -8. Prowl-Site appcast update (triggers Netlify deploy) +7. GitHub Release with all artifacts (including `appcast.xml`) ### Local Test Build (Release config, no publish) @@ -96,7 +95,6 @@ Builds a Release archive, signs it locally, and installs to `/Applications`. | `APPLE_TEAM_ID` | from identity | Apple Team ID | | `APPLE_NOTARY_KEYCHAIN_PROFILE` | `supacode-notary` | Keychain profile for notarytool | | `SPARKLE_PRIVATE_KEY_FILE` | `~/.prowl-sparkle-private-key` | EdDSA private key for appcast | -| `PROWL_SITE_DIR` | `../Prowl-Site` | Path to Prowl-Site repo | ## Notarization Credentials diff --git a/doc-onevcat/scripts/release.sh b/doc-onevcat/scripts/release.sh index af16a6d0..027f6ce2 100755 --- a/doc-onevcat/scripts/release.sh +++ b/doc-onevcat/scripts/release.sh @@ -12,12 +12,20 @@ # APPLE_TEAM_ID Apple Team ID (inferred from identity if unset) # APPLE_NOTARY_KEYCHAIN_PROFILE Keychain profile for notarytool (default: supacode-notary) # SPARKLE_PRIVATE_KEY_FILE Path to EdDSA private key file (default: ~/.prowl-sparkle-private-key) +# NETLIFY_BUILD_HOOK Netlify Build Hook URL for Prowl-Site rebuild set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" PROJECT_DIR="$(cd "$SCRIPT_DIR/../.." && pwd)" cd "$PROJECT_DIR" +# Load .env if present (not committed to repo) +if [[ -f "$PROJECT_DIR/.env" ]]; then + set -a + source "$PROJECT_DIR/.env" + set +a +fi + # ── Helpers ────────────────────────────────────────────────────────────────── origin_repo_from_remote() { @@ -330,11 +338,13 @@ log "release created: $RELEASE_URL" # ── Trigger Prowl-Site rebuild ─────────────────────────────────────────────── log "triggering Prowl-Site rebuild..." -gh api repos/onevcat/Prowl-Site/dispatches \ - -f event_type=changelog-updated \ - -f "client_payload[version]=$VERSION" 2>/dev/null \ - && log "Prowl-Site rebuild triggered" \ - || log "Prowl-Site dispatch failed (non-critical)" +if [[ -n "${NETLIFY_BUILD_HOOK:-}" ]]; then + curl -fsSL -X POST "$NETLIFY_BUILD_HOOK" 2>/dev/null \ + && log "Prowl-Site rebuild triggered" \ + || log "Prowl-Site rebuild trigger failed (non-critical)" +else + log "NETLIFY_BUILD_HOOK not set, skipping Prowl-Site rebuild" +fi echo log "done! Release: $RELEASE_URL"