From 81a30e580e068502d4a28b2ce8bdc880206d176c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 10 Jun 2020 10:02:15 -0400 Subject: [PATCH] export ipa for app store --- .../resources/export-options-app-store.plist | 17 +++++++++++++ .github/scripts/ios/export-ipa.ps1 | 24 +++++++++++++++++++ .github/workflows/build.yml | 4 ++++ 3 files changed, 45 insertions(+) create mode 100644 .github/resources/export-options-app-store.plist create mode 100644 .github/scripts/ios/export-ipa.ps1 diff --git a/.github/resources/export-options-app-store.plist b/.github/resources/export-options-app-store.plist new file mode 100644 index 000000000..ef1f8e085 --- /dev/null +++ b/.github/resources/export-options-app-store.plist @@ -0,0 +1,17 @@ + + + + + method + app-store + provisioningProfiles + + com.8bit.bitwarden + Dist: Bitwarden 2020 + com.8bit.bitwarden.autofill + Dist: Autofill 2020 + com.8bit.bitwarden.find-login-action-extension + Dist: Extension 2020 + + + diff --git a/.github/scripts/ios/export-ipa.ps1 b/.github/scripts/ios/export-ipa.ps1 new file mode 100644 index 000000000..fd133451f --- /dev/null +++ b/.github/scripts/ios/export-ipa.ps1 @@ -0,0 +1,24 @@ +param ( + [Parameter(Mandatory=$true)] + [string] $method +) + +$rootPath = $env:GITHUB_WORKSPACE; +$resourcesPath = "$rootPath/.github/resources"; +$exportOptionsPath = "$resourcesPath/export-options-$method.plist"; +$homePath = Resolve-Path "~" | Select-Object -ExpandProperty Path +$archivesPath = "$homePath/Library/Developer/Xcode/Archives"; + +cd $archivesPath +cd * +ls + +xcodebuild -exportArchive -archivePath *.xcarchive -exportPath com.8bit.bitwarden.ipa -exportOptionsPlist $exportOptionsPath + +ls + +$destPath = "$rootPath/com.8bit.bitwarden.ipa" +Copy-Item com.8bit.bitwarden.ipa $destPath + +cd $rootPath +ls diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4f071ace..1d7401884 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -165,3 +165,7 @@ jobs: shell: pwsh env: KEYCHAIN_PASSWORD: ${{ secrets.IOS_KEYCHAIN_PASSWORD }} + + - name: Export .ipa for App Store + run: ./.github/scripts/ios/export-ipa.ps1 -method app-store + shell: pwsh