diff --git a/.github/resources/export-options-ad-hoc.plist b/.github/resources/export-options-ad-hoc.plist new file mode 100644 index 000000000..48cee6f3a --- /dev/null +++ b/.github/resources/export-options-ad-hoc.plist @@ -0,0 +1,17 @@ + + + + + method + ad-hoc + provisioningProfiles + + com.8bit.bitwarden + Ad hoc: Bitwarden 2020 + com.8bit.bitwarden.autofill + Ad hoc: Autofill 2020 + com.8bit.bitwarden.find-login-action-extension + Ad hoc: Extension 2020 + + + diff --git a/.github/scripts/ios/export-ipa.ps1 b/.github/scripts/ios/export-ipa.ps1 index fd133451f..1c8baac34 100644 --- a/.github/scripts/ios/export-ipa.ps1 +++ b/.github/scripts/ios/export-ipa.ps1 @@ -4,21 +4,10 @@ ) $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 +$exportOptionsPath = "$rootPath/.github/resources/export-options-$method.plist"; +$archivePath = "$homePath/Library/Developer/Xcode/Archives/*/*.xcarchive"; +$exportPath = "$rootPath/com.8bit.bitwarden.ipa" -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 +xcodebuild -exportArchive -archivePath $archivePath -exportPath $exportPath -exportOptionsPlist $exportOptionsPath diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1d7401884..e1b6a78df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -169,3 +169,10 @@ jobs: - name: Export .ipa for App Store run: ./.github/scripts/ios/export-ipa.ps1 -method app-store shell: pwsh + + - name: Upload App Store .ipa artifact + if: github.ref == 'refs/heads/master' + uses: actions/upload-artifact@v2 + with: + name: com.8bit.bitwarden.ipa + path: ./com.8bit.bitwarden.ipa