Skip to content

Safari CI#2725

Merged
birtles merged 42 commits intomainfrom
safari-ci
Feb 17, 2026
Merged

Safari CI#2725
birtles merged 42 commits intomainfrom
safari-ci

Conversation

@birtles
Copy link
Copy Markdown
Member

@birtles birtles commented Jan 15, 2026

Try to get our Safari builds to be created as part of triggering a release.

@birtles birtles force-pushed the safari-ci branch 3 times, most recently from 9e0c089 to d0a4c91 Compare February 2, 2026 08:04
@birtles birtles marked this pull request as ready for review February 16, 2026 07:40
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ba789143ad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


steps:
- name: Checkout code
uses: actions/checkout@v6
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Build Safari artifacts from bumped commit

In the build_macos job, checkout uses the default workflow SHA instead of the commit created by bump (release-it pushes a new commit), so this job can produce iOS/macOS Safari artifacts from the previous revision while release tags and publishes needs.bump.outputs.sha. This can ship mismatched binaries/version metadata in the same release; set checkout ref to ${{ needs.bump.outputs.sha }} so all jobs build the same commit.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR automates Safari build creation as part of the release workflow. Previously, Safari builds had to be created manually on a Mac. Now they are built automatically when triggering a release.

Changes:

  • Adds export configuration plists for iOS and macOS Safari builds
  • Modifies release-it configuration to disable automatic tagging and GitHub release creation
  • Restructures the release workflow into three jobs: version bump, Safari builds, and release creation

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

File Description
xcode13/ExportOptions-iOS.plist Adds export configuration for iOS Safari app with App Store Connect settings and provisioning profiles
xcode13/ExportOptions-Mac.plist Adds export configuration for macOS Safari app with App Store Connect settings and provisioning profiles (contains typo)
.release-it.json Simplifies configuration to only bump version and push commit, removing hooks and GitHub release logic now handled by workflow
.github/workflows/release.yml Restructures workflow into separate jobs for version bump, macOS builds (with signing and export), and release creation with artifact handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml Outdated

- name: Build assets
run: |
pnpm install
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pnpm install command is missing the '--frozen-lockfile' flag. For consistency with the bump job (line 40) and to ensure reproducible builds, consider using 'pnpm install --frozen-lockfile' instead of just 'pnpm install'.

Suggested change
pnpm install
pnpm install --frozen-lockfile

Copilot uses AI. Check for mistakes.
<key>jp.co.birchill.tenten-ja-reader</key>
<string>10ten Japanese Reader App Store Connect (Mac)</string>
<key>jp.co.birchill.tenten-ja-reader.Extension</key>
<string>10ten Japanese Reader Extension App Store ConnectM</string>
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provisioning profile name appears to have a typo. It should likely be "10ten Japanese Reader Extension App Store Connect (Mac)" to match the pattern on line 14, rather than "ConnectM".

Suggested change
<string>10ten Japanese Reader Extension App Store ConnectM</string>
<string>10ten Japanese Reader Extension App Store Connect (Mac)</string>

Copilot uses AI. Check for mistakes.
Comment on lines +101 to +123
run: |
# Save the cert and profiles to temp files
echo -n "$CERT_BASE64" | base64 --decode > cert.p12
echo -n "$MAC_INSTALLER_CERT_BASE64" | base64 --decode > mac-installer.p12
echo -n "$PROFILE_IOS" | base64 --decode > ios.mobileprovision
echo -n "$PROFILE_IOS_EXT" | base64 --decode > ios-ext.mobileprovision
echo -n "$PROFILE_MAC" | base64 --decode > mac.provisionprofile
echo -n "$PROFILE_MAC_EXT" | base64 --decode > mac-ext.provisionprofile

# Create a temporary keychain and import the .p12 certificate
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain-db
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain-db
security import cert.p12 -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k build.keychain-db
security import mac-installer.p12 -P "$MAC_INSTALLER_CERT_PASSWORD" -A -t cert -f pkcs12 -k build.keychain-db
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" build.keychain-db
security list-keychain -d user -s build.keychain-db

# Install provisioning profiles
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp ios.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
cp ios-ext.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles/
cp mac.provisionprofile ~/Library/MobileDevice/Provisioning\ Profiles/
cp mac-ext.provisionprofile ~/Library/MobileDevice/Provisioning\ Profiles/
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sensitive files (cert.p12, mac-installer.p12, and provisioning profiles) are not cleaned up after use. These temporary files contain sensitive certificates and profiles that should be removed after installation. Consider adding a cleanup step or using a trap to ensure these files are deleted even if the build fails.

Copilot uses AI. Check for mistakes.
Comment on lines +111 to +116
security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain-db
security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain-db
security import cert.p12 -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k build.keychain-db
security import mac-installer.p12 -P "$MAC_INSTALLER_CERT_PASSWORD" -A -t cert -f pkcs12 -k build.keychain-db
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" build.keychain-db
security list-keychain -d user -s build.keychain-db
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The temporary keychain 'build.keychain-db' is created but never deleted. After the build completes (or fails), the keychain should be removed to avoid leaving sensitive cryptographic material on the runner. Consider adding a cleanup step that runs even on failure, such as using a separate job step with 'if: always()' or adding cleanup commands after the export steps.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release.yml Outdated
Comment on lines +147 to +154
-exportPath $GITHUB_WORKSPACE/build/10ten-ja-reader.ipa

- name: Export Mac app package
run: |
xcodebuild -exportArchive \
-archivePath $GITHUB_WORKSPACE/build/10ten-mac.xcarchive \
-exportOptionsPlist "xcode13/ExportOptions-Mac.plist" \
-exportPath $GITHUB_WORKSPACE/build/10ten-ja-reader.pkg
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exportPath is set to a directory path ending in '.ipa', but xcodebuild's -exportArchive expects a directory path, not a file path. The .ipa file will be created inside this directory. This means the actual file path will be something like '$GITHUB_WORKSPACE/build/10ten-ja-reader.ipa/10ten Japanese Reader.ipa', which won't match the artifact upload pattern '*.ipa'. The exportPath should be set to just '$GITHUB_WORKSPACE/build' or a proper directory name.

Suggested change
-exportPath $GITHUB_WORKSPACE/build/10ten-ja-reader.ipa
- name: Export Mac app package
run: |
xcodebuild -exportArchive \
-archivePath $GITHUB_WORKSPACE/build/10ten-mac.xcarchive \
-exportOptionsPlist "xcode13/ExportOptions-Mac.plist" \
-exportPath $GITHUB_WORKSPACE/build/10ten-ja-reader.pkg
-exportPath $GITHUB_WORKSPACE/build
- name: Export Mac app package
run: |
xcodebuild -exportArchive \
-archivePath $GITHUB_WORKSPACE/build/10ten-mac.xcarchive \
-exportOptionsPlist "xcode13/ExportOptions-Mac.plist" \
-exportPath $GITHUB_WORKSPACE/build

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release.yml Outdated
Comment on lines +147 to +154
-exportPath $GITHUB_WORKSPACE/build/10ten-ja-reader.ipa

- name: Export Mac app package
run: |
xcodebuild -exportArchive \
-archivePath $GITHUB_WORKSPACE/build/10ten-mac.xcarchive \
-exportOptionsPlist "xcode13/ExportOptions-Mac.plist" \
-exportPath $GITHUB_WORKSPACE/build/10ten-ja-reader.pkg
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exportPath is set to a directory path ending in '.pkg', but xcodebuild's -exportArchive expects a directory path, not a file path. The .pkg file will be created inside this directory. This means the actual file path will be something like '$GITHUB_WORKSPACE/build/10ten-ja-reader.pkg/10ten Japanese Reader.pkg', which won't match the artifact upload pattern '*.pkg'. The exportPath should be set to just '$GITHUB_WORKSPACE/build' or a proper directory name.

Suggested change
-exportPath $GITHUB_WORKSPACE/build/10ten-ja-reader.ipa
- name: Export Mac app package
run: |
xcodebuild -exportArchive \
-archivePath $GITHUB_WORKSPACE/build/10ten-mac.xcarchive \
-exportOptionsPlist "xcode13/ExportOptions-Mac.plist" \
-exportPath $GITHUB_WORKSPACE/build/10ten-ja-reader.pkg
-exportPath $GITHUB_WORKSPACE/build
- name: Export Mac app package
run: |
xcodebuild -exportArchive \
-archivePath $GITHUB_WORKSPACE/build/10ten-mac.xcarchive \
-exportOptionsPlist "xcode13/ExportOptions-Mac.plist" \
-exportPath $GITHUB_WORKSPACE/build

Copilot uses AI. Check for mistakes.
echo -n "$PROFILE_MAC" | base64 --decode > mac.provisionprofile
echo -n "$PROFILE_MAC_EXT" | base64 --decode > mac-ext.provisionprofile

# Create a temporary keychain and import the .p12 certificate
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keychain creation command will fail if 'build.keychain-db' already exists from a previous run. Although GitHub Actions typically provides clean runners, it's safer to delete any existing keychain with the same name before creating a new one. Consider adding 'security delete-keychain build.keychain-db 2>/dev/null || true' before the create-keychain command.

Suggested change
# Create a temporary keychain and import the .p12 certificate
# Create a temporary keychain and import the .p12 certificate
security delete-keychain build.keychain-db 2>/dev/null || true

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release.yml Outdated

- name: Build extension code
run: |-
pnpm install
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pnpm install command is missing the '--frozen-lockfile' flag. For consistency with the bump job (line 40) and to ensure reproducible builds, consider using 'pnpm install --frozen-lockfile' instead of just 'pnpm install'.

Suggested change
pnpm install
pnpm install --frozen-lockfile

Copilot uses AI. Check for mistakes.
@birtles birtles merged commit d11463e into main Feb 17, 2026
2 checks passed
@birtles birtles deleted the safari-ci branch February 17, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants