diff --git a/.github/scripts/archive-safari-app.sh b/.github/scripts/archive-safari-app.sh new file mode 100644 index 0000000000..8ac9ba7298 --- /dev/null +++ b/.github/scripts/archive-safari-app.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -eo pipefail + +xcodebuild -scheme Freighter -archivePath ./build/Freighter.xarchive build + +xcodebuild -archivePath ./build/Freighter.xarchive \ + -exportOptionsPlist Freighter.plist \ + -exportPath ./build \ + -allowProvisioningUpdates \ + -exportArchive | xcpretty + +xcrun altool --upload-app -f build/Freighter.ipa --apiKey $API_KEY --apiIssuer $API_ISSUER --verbose diff --git a/.github/workflows/submitProduction.yml b/.github/workflows/submitProduction.yml index a7e99369d7..206ecf706e 100644 --- a/.github/workflows/submitProduction.yml +++ b/.github/workflows/submitProduction.yml @@ -109,6 +109,8 @@ jobs: client-id: ${{ secrets.EXTENSION_CLIENT_ID }} client-secret: ${{ secrets.EXTENSION_CLIENT_SECRET }} refresh-token: ${{ secrets.EXTENSION_REFRESH_TOKEN }} + - name: Submit extension to Apple + run: ./.github/scripts/archive-safari-app.sh - name: Slack Notification uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7 #v2.2.0 env: diff --git a/README.md b/README.md index 740e168714..76af4c8366 100644 --- a/README.md +++ b/README.md @@ -106,3 +106,15 @@ fi ``` This will instruct the git hook to use the .nvmrc found in this repo. + +### TEMP NOTES + +Setup Safari to allow unsigned extensions +https://developer.apple.com/documentation/safariservices/safari_web_extensions/running_your_safari_web_extension#3744467 + +xcrun safari-web-extension-converter freighter/extension/build --project-location freighter-safari + +https://developer.apple.com/documentation/safariservices/safari_web_extensions/converting_a_web_extension_for_safari#3586258 +says we can't use persistent bg scripts but I don't see that when running it locally + +Run in xcode and open in Safari \ No newline at end of file