From 097415385e9cee4e49e2046f2c2819a1741bf2a6 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 10 Jun 2020 11:32:16 -0400 Subject: [PATCH] deploy to app store --- .github/scripts/ios/deploy-app-store.ps1 | 4 ++++ .github/workflows/build.yml | 10 ++++++++++ 2 files changed, 14 insertions(+) create mode 100644 .github/scripts/ios/deploy-app-store.ps1 diff --git a/.github/scripts/ios/deploy-app-store.ps1 b/.github/scripts/ios/deploy-app-store.ps1 new file mode 100644 index 000000000..5ec0cab75 --- /dev/null +++ b/.github/scripts/ios/deploy-app-store.ps1 @@ -0,0 +1,4 @@ +$rootPath = $env:GITHUB_WORKSPACE; +$ipaPath = "$rootPath/com.8bit.bitwarden.ipa" + +xcrun altool --upload-app --file "$ipaPath" --username "$env:APPLE_ID_USERNAME" --password "$env:APPLE_ID_PASSWORD" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1b6a78df..aed3f6d5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -161,12 +161,14 @@ jobs: run: nuget restore - name: Archive Build for App Store + if: github.ref == 'refs/heads/master' run: ./.github/scripts/ios/build.ps1 -configuration AppStore -platform iPhone -archive shell: pwsh env: KEYCHAIN_PASSWORD: ${{ secrets.IOS_KEYCHAIN_PASSWORD }} - name: Export .ipa for App Store + if: github.ref == 'refs/heads/master' run: ./.github/scripts/ios/export-ipa.ps1 -method app-store shell: pwsh @@ -176,3 +178,11 @@ jobs: with: name: com.8bit.bitwarden.ipa path: ./com.8bit.bitwarden.ipa + + - name: Deploy to App Store + if: github.ref == 'refs/heads/master' + run: ./.github/scripts/ios/deploy-app-store.ps1 + shell: pwsh + env: + APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }} + APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}