-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
paths: | ||
- Configs/Deployment.xcconfig | ||
|
||
jobs: | ||
upload: | ||
runs-on: macos-13 | ||
environment: Release | ||
env: | ||
XCODEBUILD_EXTRA_ARGS: > | ||
-allowProvisioningUpdates | ||
-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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>destination</key> | ||
<string>upload</string> | ||
<key>manageAppVersionAndBuildNumber</key> | ||
<false/> | ||
<key>method</key> | ||
<string>app-store-connect</string> | ||
<key>stripSwiftSymbols</key> | ||
<false/> | ||
</dict> | ||
</plist> |