Skip to content

Version 0.1 (2)

Version 0.1 (2) #6

Workflow file for this run

name: Release
on:
push:
paths:
- Configs/Deployment.xcconfig
jobs:
upload:
runs-on: macos-13
environment: Release
env:
XCODEBUILD_EXTRA_ARGS: >
-allowProvisioningUpdates

Check failure on line 14 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 14
-authenticationKeyPath /tmp/AuthKey.p8
-authenticationKeyID ${{ secrets.AUTHENTICATION_KEY_ID }}
-authenticationKeyIssuerID ${{ secrets.AUTHENTICATION_KEY_ISSUER_ID }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create App Store Connect Key file
run: echo "${{ secrets.APP_STORE_CONNECT_KEY }}" | base64 -d > /tmp/AuthKey.p8
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_15.2.app
- name: Set up visionOS SDK
run: |
defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES
defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES
xcodebuild -downloadPlatform visionOS
- name: System Info
run: |
uname -a
xcodebuild -version
- name: Archive macOS
run: xcodebuild $XCODEBUILD_EXTRA_ARGS -scheme macOS -archivePath macOS.xcarchive archive
- name: Archive visionOS
run: xcodebuild $XCODEBUILD_EXTRA_ARGS -scheme visionOS -archivePath visionOS.xcarchive archive
- name: Create Release
run: |
commit="$(git rev-parse HEAD)"
version="$(cat Configs/Deployment.xcconfig | grep CURRENT_PROJECT_VERSION | awk '{ print $3 }')"
curl -L -X POST \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.event.repository.name }}/git/refs \
-d "{'ref':'refs/tags/v$version','sha':'$commit'}"
curl -L -X POST \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.event.repository.name }}/releases \
-d "{'tag_name':'v$version','target_commitish':'$commit','name':'Build $version','body':'','draft':false,'prerelease':true,'generate_release_notes':false}"
# - name: Upload macOS
# run: xcodebuild -exportArchive -exportOptionsPlist Release/ExportOptions.plist -archivePath MacCast-macOS.xcarchive/ -exportPath macOS
# - name: Upload visionOS
# run: xcodebuild -exportArchive -exportOptionsPlist Release/ExportOptions.plist -archivePath MacCast-visionOS.xcarchive/ -exportPath visionOS