fixup! Fix release action following move to xcodegen #21
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cd | |
on: | |
push: | |
tags: | |
- "*" | |
jobs: | |
validation: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Validate tag is valid | |
run: | | |
echo "${{ github.ref_name }}" | grep -P '^[0-9]+\.[0-9]+\.[0-9]+$' | |
- name: Validate tag matches project version | |
run: | | |
cat project.yml | grep -P "\"${{ github.ref_name }}\"" | |
main: | |
runs-on: macos-14 | |
needs: validation | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install tools | |
uses: jdx/mise-action@v2 | |
- name: Set up XCode | |
uses: mxcl/xcodebuild@v2 | |
with: | |
xcode: 15.2 | |
platform: iOS | |
action: none | |
- name: Generate XCode project | |
uses: xavierLowmiller/[email protected] | |
- name: Import code sign | |
uses: Apple-Actions/import-codesign-certs@master | |
with: | |
p12-file-base64: ${{ secrets.APPSTORE_IOS_DISTRIBUTION_CERTIFICATES }} | |
p12-password: ${{ secrets.APPSTORE_IOS_DISTRIBUTION_CERTIFICATES_PASSWORD }} | |
- name: Download provisioning | |
uses: Apple-Actions/download-provisioning-profiles@master | |
with: | |
bundle-id: com.spruceid.mobile | |
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} | |
api-key-id: ${{ secrets.APPSTORE_KEY_ID }} | |
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }} | |
- name: Build and sign archive | |
run: | | |
xcodebuild -parallelizeTargets -archivePath "./archive" archive -scheme release CODE_SIGNING_ALLOWED="NO" | |
xcodebuild -exportArchive -exportOptionsPlist "Support/ExportOptions.plist" -archivePath "./archive.xcarchive" -exportPath "release" | |
- name: Upload to TestFlight | |
uses: Apple-Actions/upload-testflight-build@master | |
with: | |
app-path: release/App.ipa | |
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }} | |
api-key-id: ${{ secrets.APPSTORE_KEY_ID }} | |
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }} |