Branchwell

Jobley / app · jobley.ai / commits / 25fdd6db

App source: CI workflows new

written by Branchwell · 25fdd6db5ab10c2aa8816c940c95480991a95ac0 · parent 31b31c09

3 files changed

.github/workflows/checks.yml added

1+ name: Checks
2+ on:
3+ push:
4+ branches: [main]
5+ pull_request:
6+ branches: [main]
7+ permissions:
8+ contents: read
9+ concurrency:
10+ group: checks-${{ github.ref }}
11+ cancel-in-progress: true
12+ jobs:
13+ checks:
14+ runs-on: xcode-27
15+ timeout-minutes: 30
16+ steps:
17+ - uses: actions/checkout@v5
18+ - name: Select Xcode 27.2
19+ run: sudo xcode-select -s /Applications/Xcode_27.2.app
20+ - name: Package tests
21+ run: swift test
22+ - name: Generate the Xcode project
23+ run: brew list xcodegen >/dev/null 2>&1 || brew install xcodegen; xcodegen generate
24+ - name: Build for Mac
25+ run: |
26+ set -o pipefail
27+ xcodebuild -project Jobley.xcodeproj -scheme JobleyMac -configuration Release \
28+ -destination 'generic/platform=macOS' CODE_SIGNING_ALLOWED=NO build | grep -E "error:|BUILD"
29+ - name: Build for iPhone
30+ run: |
31+ set -o pipefail
32+ xcodebuild -project Jobley.xcodeproj -scheme JobleyPhone -configuration Release \
33+ -destination 'generic/platform=iOS' CODE_SIGNING_ALLOWED=NO build | grep -E "error:|BUILD"

.github/workflows/mac-release.yml added

1+ name: Mac release
2+ # Builds, signs, notarizes and publishes a Mac release from the cloud: the DMG and Sparkle appcast go to
3+ # protomota/jobley-site main, which Vercel deploys to jobley.ai. Same script as a local release:
4+ # scripts/release-mac.sh. See RELEASING.md for the secrets.
5+ on:
6+ workflow_dispatch:
7+ inputs:
8+ version:
9+ description: Version to release, for example 0.1.1
10+ required: true
11+ notes:
12+ description: What changed (shown in the update window)
13+ default: Bug fixes and improvements.
14+ permissions:
15+ contents: write
16+ concurrency:
17+ group: mac-release
18+ cancel-in-progress: false
19+ jobs:
20+ release:
21+ runs-on: xcode-27
22+ timeout-minutes: 60
23+ steps:
24+ - uses: actions/checkout@v5
25+ with:
26+ ref: main
27+ - uses: actions/checkout@v5
28+ with:
29+ repository: protomota/jobley-site
30+ ref: main
31+ path: site
32+ token: ${{ secrets.SITE_REPO_TOKEN }}
33+ - name: Select Xcode 27.2
34+ run: sudo xcode-select -s /Applications/Xcode_27.2.app
35+ - name: Install XcodeGen
36+ run: brew list xcodegen >/dev/null 2>&1 || brew install xcodegen
37+ - name: Import the Developer ID certificate
38+ env:
39+ DEVELOPER_ID_P12_BASE64: ${{ secrets.DEVELOPER_ID_P12_BASE64 }}
40+ DEVELOPER_ID_P12_PASSWORD: ${{ secrets.DEVELOPER_ID_P12_PASSWORD }}
41+ run: |
42+ keychain="$RUNNER_TEMP/release.keychain-db"
43+ password="$(uuidgen)"
44+ security create-keychain -p "$password" "$keychain"
45+ security set-keychain-settings -lut 3600 "$keychain"
46+ security unlock-keychain -p "$password" "$keychain"
47+ echo "$DEVELOPER_ID_P12_BASE64" | base64 --decode > "$RUNNER_TEMP/developer-id.p12"
48+ security import "$RUNNER_TEMP/developer-id.p12" -k "$keychain" -P "$DEVELOPER_ID_P12_PASSWORD" -T /usr/bin/codesign -T /usr/bin/security
49+ security set-key-partition-list -S apple-tool:,apple: -s -k "$password" "$keychain" > /dev/null
50+ security list-keychains -d user -s "$keychain" login.keychain-db
51+ rm "$RUNNER_TEMP/developer-id.p12"
52+ - name: Write the Apple API key
53+ env:
54+ APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
55+ run: |
56+ umask 077
57+ printf '%s' "$APPLE_API_KEY" > "$RUNNER_TEMP/AuthKey.p8"
58+ - name: Release
59+ env:
60+ JOBLEY_RELEASE_DIR: ${{ runner.temp }}/jobley-release
61+ JOBLEY_SITE_DIR: ${{ github.workspace }}/site
62+ APPLE_API_KEY_PATH: ${{ runner.temp }}/AuthKey.p8
63+ APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
64+ APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
65+ JOBLEY_SPARKLE_EDDSA_PRIVATE_KEY: ${{ secrets.JOBLEY_SPARKLE_EDDSA_PRIVATE_KEY }}
66+ RELEASE_VERSION: ${{ inputs.version }}
67+ RELEASE_NOTES: ${{ inputs.notes }}
68+ run: |
69+ for repo in . site; do
70+ git -C "$repo" config user.name "github-actions[bot]"
71+ git -C "$repo" config user.email "41898282+github-actions[bot]@users.noreply.github.com"
72+ done
73+ scripts/release-mac.sh "$RELEASE_VERSION" --notes "$RELEASE_NOTES" --publish
74+ - name: Remove signing material
75+ if: always()
76+ run: |
77+ security delete-keychain "$RUNNER_TEMP/release.keychain-db" || true
78+ rm -f "$RUNNER_TEMP/AuthKey.p8"

.github/workflows/testflight.yml added

1+ name: TestFlight
2+ # Builds the iPhone app and uploads it to TestFlight (internal group "Jobley Internal").
3+ # Same script as a local upload: scripts/release-ios.sh. See RELEASING.md for the secrets.
4+ on:
5+ workflow_dispatch:
6+ inputs:
7+ build:
8+ description: Build number (empty = one more than App Store Connect's newest)
9+ required: false
10+ permissions:
11+ contents: read
12+ concurrency:
13+ group: testflight
14+ cancel-in-progress: false
15+ jobs:
16+ upload:
17+ runs-on: xcode-27
18+ timeout-minutes: 75
19+ steps:
20+ - uses: actions/checkout@v5
21+ with:
22+ ref: main
23+ - name: Select Xcode 27.2
24+ run: sudo xcode-select -s /Applications/Xcode_27.2.app
25+ - name: Install XcodeGen
26+ run: brew list xcodegen >/dev/null 2>&1 || brew install xcodegen
27+ - name: Import the Apple Distribution certificate
28+ env:
29+ DISTRIBUTION_P12_BASE64: ${{ secrets.DISTRIBUTION_P12_BASE64 }}
30+ DISTRIBUTION_P12_PASSWORD: ${{ secrets.DISTRIBUTION_P12_PASSWORD }}
31+ run: |
32+ keychain="$RUNNER_TEMP/release.keychain-db"
33+ password="$(uuidgen)"
34+ security create-keychain -p "$password" "$keychain"
35+ security set-keychain-settings -lut 3600 "$keychain"
36+ security unlock-keychain -p "$password" "$keychain"
37+ echo "$DISTRIBUTION_P12_BASE64" | base64 --decode > "$RUNNER_TEMP/distribution.p12"
38+ security import "$RUNNER_TEMP/distribution.p12" -k "$keychain" -P "$DISTRIBUTION_P12_PASSWORD" -T /usr/bin/codesign -T /usr/bin/security
39+ security set-key-partition-list -S apple-tool:,apple: -s -k "$password" "$keychain" > /dev/null
40+ security list-keychains -d user -s "$keychain" login.keychain-db
41+ rm "$RUNNER_TEMP/distribution.p12"
42+ - name: Write the App Store Connect upload key
43+ env:
44+ ASC_UPLOAD_KEY: ${{ secrets.ASC_UPLOAD_KEY }}
45+ run: |
46+ umask 077
47+ printf '%s\n' "$ASC_UPLOAD_KEY" > "$RUNNER_TEMP/AuthKey.p8"
48+ - name: Upload
49+ env:
50+ JOBLEY_RELEASE_DIR: ${{ runner.temp }}/jobley-release
51+ APPLE_API_KEY_PATH: ${{ runner.temp }}/AuthKey.p8
52+ APPLE_API_KEY_ID: ${{ secrets.ASC_UPLOAD_KEY_ID }}
53+ APPLE_API_ISSUER: ${{ secrets.ASC_UPLOAD_ISSUER }}
54+ BUILD: ${{ inputs.build }}
55+ run: scripts/release-ios.sh ${BUILD:+--build "$BUILD"}
56+ - name: Remove signing material
57+ if: always()
58+ run: |
59+ security delete-keychain "$RUNNER_TEMP/release.keychain-db" || true
60+ rm -f "$RUNNER_TEMP/AuthKey.p8"

Browse files at this commit