Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF
SPARKLE_APPCAST_URL = $SPARKLE_APPCAST_URL
SPARKLE_PUBLIC_KEY = $SPARKLE_PUBLIC_KEY
EOF

- name: Build and test app (macOS)
run: |
RESULT_BUNDLE="$RUNNER_TEMP/BitDream.xcresult"
Expand Down Expand Up @@ -113,26 +93,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 <<EOF
SPARKLE_APPCAST_URL = $SPARKLE_APPCAST_URL
SPARKLE_PUBLIC_KEY = $SPARKLE_PUBLIC_KEY
EOF

- name: Build app (iOS)
run: |
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild build \
Expand Down
26 changes: 6 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v7

- name: Load Sparkle build settings
env:
SPARKLE_APPCAST_URL: ${{ vars.SPARKLE_APPCAST_URL }}
SPARKLE_PUBLIC_KEY: ${{ vars.SPARKLE_PUBLIC_KEY }}
- name: Load Sparkle configuration
run: |
SPARKLE_APPCAST_URL="$(/usr/libexec/PlistBuddy -c 'Print :SUFeedURL' BitDream/Info.plist 2>/dev/null || true)"
SPARKLE_PUBLIC_KEY="$(/usr/libexec/PlistBuddy -c 'Print :SUPublicEDKey' BitDream/Info.plist 2>/dev/null || true)"

if [[ -z "${SPARKLE_APPCAST_URL:-}" ]]; then
echo "Missing required repository variable: SPARKLE_APPCAST_URL"
echo "BitDream/Info.plist is missing SUFeedURL"
exit 1
fi

if [[ -z "${SPARKLE_PUBLIC_KEY:-}" ]]; then
echo "Missing required repository variable: SPARKLE_PUBLIC_KEY"
echo "BitDream/Info.plist is missing SUPublicEDKey"
exit 1
fi

Expand All @@ -47,13 +47,6 @@ jobs:
echo "SPARKLE_APPCAST_URL=$SPARKLE_APPCAST_URL" >> "$GITHUB_ENV"
echo "SPARKLE_PUBLIC_KEY=$SPARKLE_PUBLIC_KEY" >> "$GITHUB_ENV"

- name: Write CI build settings override
run: |
cat > Config/BuildSettings.local.xcconfig <<EOF
SPARKLE_APPCAST_URL = $SPARKLE_APPCAST_URL
SPARKLE_PUBLIC_KEY = $SPARKLE_PUBLIC_KEY
EOF

- name: Validate release version
run: |
BUILD_SETTINGS="$(
Expand Down Expand Up @@ -176,8 +169,6 @@ jobs:
DEVELOPMENT_TEAM="${{ secrets.APPLE_TEAM_ID }}" \
OTHER_CODE_SIGN_FLAGS="--keychain $KEYCHAIN_PATH" \
CURRENT_PROJECT_VERSION="${RELEASE_TAG#v}" \
SPARKLE_APPCAST_URL="$SPARKLE_APPCAST_URL" \
SPARKLE_PUBLIC_KEY="$SPARKLE_PUBLIC_KEY" \
ARCHS=arm64

- name: Export archived app
Expand Down Expand Up @@ -423,11 +414,6 @@ jobs:
DOWNLOAD_PREFIX="${REPOSITORY_URL}/releases/download/${RELEASE_TAG}/"
RELEASE_LINK="${REPOSITORY_URL}/releases/tag/${RELEASE_TAG}"

if [[ -z "${SPARKLE_APPCAST_URL:-}" ]]; then
echo "Missing required repository variable: SPARKLE_APPCAST_URL"
exit 1
fi

GENERATE_APPCAST="$(find "$HOME/Library/Developer/Xcode/DerivedData" -path '*/SourcePackages/artifacts/sparkle/Sparkle/bin/generate_appcast' -print -quit)"
if [[ -z "${GENERATE_APPCAST}" ]]; then
GENERATE_APPCAST="$(find "$HOME/Library/Developer/Xcode/DerivedData" -path '*/SourcePackages/checkouts/Sparkle/bin/generate_appcast' -print -quit)"
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ build/
# macOS custom folder icon
Icon[^a-zA-Z]

# Local build setting overrides
# Legacy local build setting overrides
Config/BuildSettings.local.xcconfig
14 changes: 0 additions & 14 deletions BitDream.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@
4BDACD162E73DB220074F714 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; };
4BDACD182E73DB220074F714 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; };
4BDACD502E73DBBE0074F714 /* BitDream/Widgets/AppGroup.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BitDream/Widgets/AppGroup.swift; sourceTree = SOURCE_ROOT; };
4D2000013B10000000C3D4E5 /* BuildSettings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = BuildSettings.xcconfig; sourceTree = "<group>"; };
4D2000023B10000000C3D4E5 /* BuildSettings.example.local.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = BuildSettings.example.local.xcconfig; sourceTree = "<group>"; };
5A1000074100000000A1B2C3 /* BitDreamTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BitDreamTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6A2000014200000000B1C2D3 /* BitDream.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BitDream.app; sourceTree = BUILT_PRODUCTS_DIR; };
6A20000E4200000000B1C2D3 /* BitDreamWidgetsExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = BitDreamWidgetsExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -194,7 +192,6 @@
isa = PBXGroup;
children = (
4B4E4C1A2E8A1F6E00418FD7 /* AppIcons */,
4D2000033B10000000C3D4E5 /* Config */,
4B1DADDD295E6C440037E9FB /* BitDream */,
5A10000A4100000000A1B2C3 /* BitDreamTests */,
4BDACD1A2E73DB220074F714 /* BitDreamWidgets */,
Expand Down Expand Up @@ -235,15 +232,6 @@
name = Frameworks;
sourceTree = "<group>";
};
4D2000033B10000000C3D4E5 /* Config */ = {
isa = PBXGroup;
children = (
4D2000013B10000000C3D4E5 /* BuildSettings.xcconfig */,
4D2000023B10000000C3D4E5 /* BuildSettings.example.local.xcconfig */,
);
path = Config;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -610,7 +598,6 @@
};
4B1DADF0295E6C450037E9FB /* Debug configuration for PBXNativeTarget "BitDream" */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4D2000013B10000000C3D4E5 /* BuildSettings.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = BitDreamAppIconDefault;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
Expand Down Expand Up @@ -657,7 +644,6 @@
};
4B1DADF1295E6C450037E9FB /* Release configuration for PBXNativeTarget "BitDream" */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 4D2000013B10000000C3D4E5 /* BuildSettings.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = BitDreamAppIconDefault;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
Expand Down
4 changes: 2 additions & 2 deletions BitDream/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@
<key>SUEnableAutomaticChecks</key>
<true/>
<key>SUFeedURL</key>
<string>$(SPARKLE_APPCAST_URL)</string>
<string>https://austin-smith.github.io/BitDream/appcast.xml</string>
<key>SUPublicEDKey</key>
<string>$(SPARKLE_PUBLIC_KEY)</string>
<string>+KG79p7oudH/MKhpfJ33550iZtqjQFKptFttQf1sGyI=</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>
Expand Down
3 changes: 0 additions & 3 deletions Config/BuildSettings.example.local.xcconfig

This file was deleted.

9 changes: 0 additions & 9 deletions Config/BuildSettings.xcconfig

This file was deleted.

19 changes: 0 additions & 19 deletions docs/build-settings.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/releases.md
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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.
28 changes: 12 additions & 16 deletions docs/sparkle-updates.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 0 additions & 6 deletions scripts/tag-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading