-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
9cd2173
commit e821a0f
Showing
4 changed files
with
81 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 |
---|---|---|
@@ -1,2 +1,10 @@ | ||
## User settings | ||
xcuserdata/ | ||
|
||
## Secrets | ||
.env | ||
|
||
## Distribution artefacts | ||
output/ | ||
tmp_derived_data/ | ||
release.zip |
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,4 @@ | ||
export API_KEY_PATH=./AuthKey_XXXXXXXXXX.p8 | ||
export API_KEY_ID=XXXXXXXXXX | ||
export API_KEY_ISSUER=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | ||
export DEVELOPER_ID_CERTIFICATE="Developer ID Application" |
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,55 @@ | ||
#!/bin/bash | ||
|
||
#################################################################################################### | ||
# How to run: | ||
# | ||
# cp script/.env.template script/.env | ||
# # Fill script/.env.template | ||
# source script/.env | ||
# ./script/distribute.sh | ||
#################################################################################################### | ||
|
||
set -e | ||
set -o xtrace | ||
|
||
cd "$(dirname "$0")" | ||
cd .. | ||
|
||
OUTPUT_DIR="output" | ||
ARCHIVE_PATH="$OUTPUT_DIR/archive.xcarchive" | ||
|
||
xcodebuild archive -scheme PlaygroundQLPreviewProvider \ | ||
-archivePath "$ARCHIVE_PATH" \ | ||
-destination "generic/platform=macOS" \ | ||
-derivedDataPath "tmp_derived_data" | ||
|
||
xcodebuild -exportArchive \ | ||
-archivePath "$ARCHIVE_PATH" \ | ||
-exportOptionsPlist "scripts/exportOptions.plist" \ | ||
-allowProvisioningUpdates \ | ||
-authenticationKeyIssuerID "$API_KEY_ISSUER" \ | ||
-authenticationKeyID "$API_KEY_ID" \ | ||
-authenticationKeyPath "$API_KEY_PATH" \ | ||
-exportPath "$OUTPUT_DIR" | ||
|
||
GENERATED_APP="$OUTPUT_DIR/PlaygroundQLPreviewProvider.app" | ||
|
||
cp -r "$GENERATED_APP" "$GENERATED_APP.backup" | ||
|
||
pushd "$OUTPUT_DIR" | ||
zip -r "PlaygroundQLPreviewProvider-notarize.zip" PlaygroundQLPreviewProvider.app | ||
popd | ||
|
||
xcrun notarytool submit "$OUTPUT_DIR/PlaygroundQLPreviewProvider-notarize.zip" \ | ||
--key $API_KEY_PATH \ | ||
--key-id $API_KEY_ID \ | ||
--issuer $API_KEY_ISSUER \ | ||
--wait | ||
xcrun stapler staple "$GENERATED_APP" | ||
|
||
pushd "$OUTPUT_DIR" | ||
zip -r "../release.zip" PlaygroundQLPreviewProvider.app | ||
popd | ||
|
||
echo 'SUCCESSFUL Release !' | ||
echo 'The app is present in "release.zip"' |
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>method</key> | ||
<string>developer-id</string> | ||
<key>destination</key> | ||
<string>export</string> | ||
<key>teamID</key> | ||
<string>BY7K35VQV5</string> | ||
<key>signingStyle</key> | ||
<string>automatic</string> | ||
</dict> | ||
</plist> |