name: Mac release # Builds, signs, notarizes and publishes a Mac release from the cloud: the DMG and Sparkle appcast go to # protomota/jobley-site main, which Vercel deploys to jobley.ai. Same script as a local release: # scripts/release-mac.sh. See RELEASING.md for the secrets. on: workflow_dispatch: inputs: version: description: Version to release, for example 0.1.1 required: true notes: description: What changed (shown in the update window) default: Bug fixes and improvements. permissions: contents: write concurrency: group: mac-release cancel-in-progress: false jobs: release: runs-on: xcode-27 timeout-minutes: 60 steps: - uses: actions/checkout@v5 with: ref: main - uses: actions/checkout@v5 with: repository: protomota/jobley-site ref: main path: site token: ${{ secrets.SITE_REPO_TOKEN }} - name: Select Xcode 27.2 run: sudo xcode-select -s /Applications/Xcode_27.2.app - name: Install XcodeGen run: brew list xcodegen >/dev/null 2>&1 || brew install xcodegen - name: Import the Developer ID certificate env: DEVELOPER_ID_P12_BASE64: ${{ secrets.DEVELOPER_ID_P12_BASE64 }} DEVELOPER_ID_P12_PASSWORD: ${{ secrets.DEVELOPER_ID_P12_PASSWORD }} run: | keychain="$RUNNER_TEMP/release.keychain-db" password="$(uuidgen)" security create-keychain -p "$password" "$keychain" security set-keychain-settings -lut 3600 "$keychain" security unlock-keychain -p "$password" "$keychain" echo "$DEVELOPER_ID_P12_BASE64" | base64 --decode > "$RUNNER_TEMP/developer-id.p12" security import "$RUNNER_TEMP/developer-id.p12" -k "$keychain" -P "$DEVELOPER_ID_P12_PASSWORD" -T /usr/bin/codesign -T /usr/bin/security security set-key-partition-list -S apple-tool:,apple: -s -k "$password" "$keychain" > /dev/null security list-keychains -d user -s "$keychain" login.keychain-db rm "$RUNNER_TEMP/developer-id.p12" - name: Write the Apple API key env: APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }} run: | umask 077 printf '%s' "$APPLE_API_KEY" > "$RUNNER_TEMP/AuthKey.p8" - name: Release env: JOBLEY_RELEASE_DIR: ${{ runner.temp }}/jobley-release JOBLEY_SITE_DIR: ${{ github.workspace }}/site APPLE_API_KEY_PATH: ${{ runner.temp }}/AuthKey.p8 APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }} APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} JOBLEY_SPARKLE_EDDSA_PRIVATE_KEY: ${{ secrets.JOBLEY_SPARKLE_EDDSA_PRIVATE_KEY }} RELEASE_VERSION: ${{ inputs.version }} RELEASE_NOTES: ${{ inputs.notes }} run: | for repo in . site; do git -C "$repo" config user.name "github-actions[bot]" git -C "$repo" config user.email "41898282+github-actions[bot]@users.noreply.github.com" done scripts/release-mac.sh "$RELEASE_VERSION" --notes "$RELEASE_NOTES" --publish - name: Remove signing material if: always() run: | security delete-keychain "$RUNNER_TEMP/release.keychain-db" || true rm -f "$RUNNER_TEMP/AuthKey.p8"