diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d209e1d..0e6f102 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,26 +39,6 @@ jobs: - name: Checkout uses: actions/checkout@v7 - - name: Write CI build settings override - env: - SPARKLE_APPCAST_URL: ${{ vars.SPARKLE_APPCAST_URL }} - SPARKLE_PUBLIC_KEY: ${{ vars.SPARKLE_PUBLIC_KEY }} - run: | - if [[ -z "${SPARKLE_APPCAST_URL:-}" ]]; then - echo "Missing required repository variable: SPARKLE_APPCAST_URL" - exit 1 - fi - - if [[ -z "${SPARKLE_PUBLIC_KEY:-}" ]]; then - echo "Missing required repository variable: SPARKLE_PUBLIC_KEY" - exit 1 - fi - - cat > Config/BuildSettings.local.xcconfig < Config/BuildSettings.local.xcconfig <> "$GITHUB_ENV" echo "SPARKLE_PUBLIC_KEY=$SPARKLE_PUBLIC_KEY" >> "$GITHUB_ENV" - - name: Write CI build settings override - run: | - cat > Config/BuildSettings.local.xcconfig <SUEnableAutomaticChecks SUFeedURL - $(SPARKLE_APPCAST_URL) + https://austin-smith.github.io/BitDream/appcast.xml SUPublicEDKey - $(SPARKLE_PUBLIC_KEY) + +KG79p7oudH/MKhpfJ33550iZtqjQFKptFttQf1sGyI= UTExportedTypeDeclarations diff --git a/Config/BuildSettings.example.local.xcconfig b/Config/BuildSettings.example.local.xcconfig deleted file mode 100644 index a4369d2..0000000 --- a/Config/BuildSettings.example.local.xcconfig +++ /dev/null @@ -1,3 +0,0 @@ -// Copy this file to Config/BuildSettings.local.xcconfig and customize locally. -SPARKLE_APPCAST_URL = https:/$()/example.github.io/BitDream/appcast.xml -SPARKLE_PUBLIC_KEY = REPLACE_WITH_YOUR_SPARKLE_PUBLIC_KEY diff --git a/Config/BuildSettings.xcconfig b/Config/BuildSettings.xcconfig deleted file mode 100644 index e7fc153..0000000 --- a/Config/BuildSettings.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -// Shared build settings layer for repo-wide configurable values. -// Keep environment-specific values out of source-controlled project settings. -SPARKLE_APPCAST_URL = __UNSET__ -SPARKLE_PUBLIC_KEY = __UNSET__ - -// Required local/CI overrides. -// Local development: create Config/BuildSettings.local.xcconfig. -// CI: writes this file before build. -#include "BuildSettings.local.xcconfig" diff --git a/docs/build-settings.md b/docs/build-settings.md deleted file mode 100644 index da564c1..0000000 --- a/docs/build-settings.md +++ /dev/null @@ -1,19 +0,0 @@ -# Build Settings Reference - -## Files -- `Config/BuildSettings.xcconfig` (tracked): shared defaults and variable declarations. -- `Config/BuildSettings.example.local.xcconfig` (tracked): template for local setup. -- `Config/BuildSettings.local.xcconfig` (ignored): required local/CI overrides. - -These files configure the direct-download `BitDream` target. The -`BitDreamAppStore` target neither reads Sparkle settings nor requires a local -override file. - -## Local Setup -1. Copy `Config/BuildSettings.example.local.xcconfig` to `Config/BuildSettings.local.xcconfig`. -2. Set local values (currently `SPARKLE_APPCAST_URL` and `SPARKLE_PUBLIC_KEY`). - -## CI / Release -- CI writes `Config/BuildSettings.local.xcconfig` before archive builds. -- For Sparkle, release workflow uses repo variables `SPARKLE_APPCAST_URL` and `SPARKLE_PUBLIC_KEY`. -- The Mac App Store build uses its dedicated Sparkle-free target and scheme. diff --git a/docs/releases.md b/docs/releases.md index fe5071c..9c3ae78 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -1,6 +1,6 @@ # Creating a Release -Set the app and widget `MARKETING_VERSION` to the same `major.minor.patch` value and merge the change into `main`. The local checkout must be clean, match `origin/main`, and have `Config/BuildSettings.local.xcconfig` configured. +Set the app and widget `MARKETING_VERSION` to the same `major.minor.patch` value and merge the change into `main`. The local checkout must be clean and match `origin/main`. Run the preflight checks, then create a stable release tag: @@ -11,7 +11,7 @@ Run the preflight checks, then create a stable release tag: Pushing the tag starts `.github/workflows/release.yml`, which builds, signs, notarizes, and publishes the macOS release. The workflow rejects tags that do not match the Xcode marketing version. -See `docs/build-settings.md` and `docs/sparkle-updates.md` for configuration details. +See `docs/sparkle-updates.md` for Sparkle configuration details. This workflow publishes the direct-download build. See `docs/mac-app-store.md` for the separate Mac App Store archive process. diff --git a/docs/sparkle-updates.md b/docs/sparkle-updates.md index fccf06d..40878bb 100644 --- a/docs/sparkle-updates.md +++ b/docs/sparkle-updates.md @@ -1,21 +1,17 @@ # Sparkle Update Configuration -## Required Variables -- `SPARKLE_APPCAST_URL`: Sparkle feed URL. -- `SPARKLE_PUBLIC_KEY`: Sparkle public key. +## App Configuration -## Build Contract -- `INFOPLIST_KEY_SUFeedURL[sdk=macosx*]` resolves from `$(SPARKLE_APPCAST_URL)`. -- `INFOPLIST_KEY_SUPublicEDKey[sdk=macosx*]` resolves from `$(SPARKLE_PUBLIC_KEY)`. +`BitDream/Info.plist` contains the public Sparkle configuration: -## Validation -- `Config/BuildSettings.local.xcconfig` is required by `Config/BuildSettings.xcconfig`. -- Local builds fail at config load time when the required local override file is missing. -- CI validates `SPARKLE_APPCAST_URL` format and verifies embedded app `SUFeedURL` and `SUPublicEDKey` match expected values. +- `SUFeedURL`: Sparkle feed URL. +- `SUPublicEDKey`: Sparkle public EdDSA key. -## Release Workflow Contract -- GitHub repository variables: `SPARKLE_APPCAST_URL`, `SPARKLE_PUBLIC_KEY`. -- Workflow injects Sparkle settings into: - - app archive build (`xcodebuild archive`) - - appcast generation/download steps -- Workflow verifies embedded app values match `SPARKLE_APPCAST_URL` and `SPARKLE_PUBLIC_KEY`. +Local, pull request, and release builds all use these tracked values. The +release workflow verifies that the archived app contains the same values. + +## Release Signing + +The Sparkle private EdDSA key is stored in the GitHub Actions secret +`SPARKLE_PRIVATE_KEY_BASE64`. The release workflow uses it to sign appcast +entries. Never commit the private key. diff --git a/scripts/tag-version.sh b/scripts/tag-version.sh index e4284d2..c1149c7 100755 --- a/scripts/tag-version.sh +++ b/scripts/tag-version.sh @@ -64,12 +64,6 @@ if ! git remote get-url origin >/dev/null 2>&1; then exit 1 fi -if [[ ! -f Config/BuildSettings.local.xcconfig ]]; then - echo "Missing Config/BuildSettings.local.xcconfig." >&2 - echo "Create it from Config/BuildSettings.example.local.xcconfig before tagging a release." >&2 - exit 1 -fi - echo "Fetching origin/main and release tags..." git fetch origin refs/heads/main:refs/remotes/origin/main --tags