Skip to content

Version 0.1 (15)

Version 0.1 (15) #71

Workflow file for this run

name: Release
on:
push:
paths:
- Configs/Deployment.xcconfig
jobs:
upload:
runs-on: macos-14
environment: Release
env:
GH_TOKEN: ${{ github.token }}
XCODEBUILD_EXTRA_ARGS: >
-allowProvisioningUpdates
-authenticationKeyPath /tmp/AuthKey.p8
-authenticationKeyID ${{ secrets.AUTHENTICATION_KEY_ID }}
-authenticationKeyIssuerID ${{ secrets.AUTHENTICATION_KEY_ISSUER_ID }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Sanity check
run: |
set -x
version="$(cat Configs/Deployment.xcconfig | grep CURRENT_PROJECT_VERSION | awk '{ print $3 }')"
marketing_version="$(cat Configs/Deployment.xcconfig | grep MARKETING_VERSION | awk '{ print $3 }')"
# Grab all the tags
git fetch --tags
# Make sure this version doesn't exist already
! git tag --list | grep -q "v$version"
# Check that the commit message matches the version
git log -1 --pretty=%B | grep "\($version\)"
git log -1 --pretty=%B | grep "\($marketing_version\)"
- name: Create App Store Connect Key file
run: echo "${{ secrets.APP_STORE_CONNECT_KEY }}" | base64 -d > /tmp/AuthKey.p8
- name: Set up signing
run: |
KEYCHAIN="$RUNNER_TEMP/keychain.keychain-db"
KEYCHAIN_PASSWORD=password
echo "${{ secrets.CERTIFICATE }}" | base64 -d > "$RUNNER_TEMP/Certificate.p12"
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
security set-keychain-settings "$KEYCHAIN"
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
security list-keychains -d user -s "$KEYCHAIN"
security import "$RUNNER_TEMP/Certificate.p12" -P "${{ secrets.CERTIFICATE_PASSWORD }}" -A -k "$KEYCHAIN"
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp Release/iOS.mobileprovision ~/Library/MobileDevice/Provisioning\ Profiles
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_16.1_beta.app
- name: Disable macro validation
run: |
defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidatation -bool YES
defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
- name: System Info
run: |
uname -a
xcodebuild -version
- name: Debug stuff
run: |
security find-identity -p codesigning -v
certtool y
- name: Archive macOS
run: xcodebuild -scheme macOS -archivePath macOS.xcarchive archive
- name: Archive visionOS
run: xcodebuild -scheme visionOS -archivePath visionOS.xcarchive archive
- name: Collect Assets
run: |
(
cd macOS.xcarchive/Products/Applications/
zip -r macOS.zip Ensemble.app
mv macOS.zip ../../..
)
(
cd macOS.xcarchive/dSYMs/
zip -r macOS-symbols.zip Ensemble.app.dSYM/
mv macOS-symbols.zip ../..
)
(
cd visionOS.xcarchive/Products/Applications/
zip -r visionOS.zip Ensemble.app
mv visionOS.zip ../../..
)
(
cd visionOS.xcarchive/dSYMs/
zip -r visionOS-symbols.zip Ensemble.app.dSYM/
mv visionOS-symbols.zip ../..
)
# - name: Create Release
# run: |
# version="$(cat Configs/Deployment.xcconfig | grep CURRENT_PROJECT_VERSION | awk '{ print $3 }')"
# gh release create "v$version" -t "Build $version" -p macOS.zip macOS-symbols.zip visionOS.zip visionOS-symbols.zip
# - name: Upload macOS
# run: xcodebuild $XCODEBUILD_EXTRA_ARGS -exportArchive -exportOptionsPlist Release/ExportOptions.plist -archivePath macOS.xcarchive/ -exportPath macOS
# - name: Upload visionOS
# run: xcodebuild $XCODEBUILD_EXTRA_ARGS -exportArchive -exportOptionsPlist Release/ExportOptions.plist -archivePath visionOS.xcarchive/ -exportPath visionOS
# - name: Send to TestFlight
# env:
# AUTHENTICATION_KEY: /tmp/AuthKey.p8
# AUTHENTICATION_KEY_ID: ${{ secrets.AUTHENTICATION_KEY_ID }}
# AUTHENTICATION_KEY_ISSUER_ID: ${{ secrets.AUTHENTICATION_KEY_ISSUER_ID }}
# run: |
# version="$(cat Configs/Deployment.xcconfig | grep CURRENT_PROJECT_VERSION | awk '{ print $3 }')"
# # Make sure we all have all the latest tags (for notes)
# git fetch --tags
# Release/send_to_testflight.swift "$version"