diff --git a/.github/scripts/ios/decrypt-secrets.ps1 b/.github/scripts/ios/decrypt-secrets.ps1 index e979de75c..132db33c4 100644 --- a/.github/scripts/ios/decrypt-secrets.ps1 +++ b/.github/scripts/ios/decrypt-secrets.ps1 @@ -4,3 +4,6 @@ $decryptSecretPath = $($rootPath + "/.github/scripts/decrypt-secret.ps1"); Invoke-Expression "& `"$decryptSecretPath`" -filename bitwarden-mobile-key.p12.gpg" Invoke-Expression "& `"$decryptSecretPath`" -filename iphone-distribution-cert.p12.gpg" +Invoke-Expression "& `"$decryptSecretPath`" -filename dist_autofill.mobileprovision.gpg" +Invoke-Expression "& `"$decryptSecretPath`" -filename dist_bitwarden.mobileprovision.gpg" +Invoke-Expression "& `"$decryptSecretPath`" -filename dist_extension.mobileprovision.gpg" diff --git a/.github/scripts/ios/setup-profiles.ps1 b/.github/scripts/ios/setup-profiles.ps1 new file mode 100644 index 000000000..4967db840 --- /dev/null +++ b/.github/scripts/ios/setup-profiles.ps1 @@ -0,0 +1,15 @@ +$homePath = $env:HOME; +$secretsPath = $homePath + "/secrets" + +$autofillProfilePath = $($secretsPath + "/dist_autofill.mobileprovision"); +$bitwardenProfilePath = $($secretsPath + "/dist_bitwarden.mobileprovision"); +$extensionProfilePath = $($secretsPath + "/dist_extension.mobileprovision"); + +$autofill_uuid = grep UUID -A1 -a $autofillProfilePath | grep -io "[-A-F0-9]\{36\}" +Copy-Item $autofillProfilePath ~/Library/MobileDevice/Provisioning\ Profiles/$autofill_uuid.mobileprovision + +$bitwarden_uuid = grep UUID -A1 -a $bitwardenProfilePath | grep -io "[-A-F0-9]\{36\}" +Copy-Item $bitwardenProfilePath ~/Library/MobileDevice/Provisioning\ Profiles/$bitwarden_uuid.mobileprovision + +$extension_uuid = grep UUID -A1 -a $extensionProfilePath | grep -io "[-A-F0-9]\{36\}" +Copy-Item $extensionProfilePath ~/Library/MobileDevice/Provisioning\ Profiles/$extension_uuid.mobileprovision diff --git a/.github/secrets/Dist_Autofill_2020.mobileprovision.gpg b/.github/secrets/dist_autofill.mobileprovision.gpg similarity index 100% rename from .github/secrets/Dist_Autofill_2020.mobileprovision.gpg rename to .github/secrets/dist_autofill.mobileprovision.gpg diff --git a/.github/secrets/Dist_Bitwarden_2020.mobileprovision.gpg b/.github/secrets/dist_bitwarden.mobileprovision.gpg similarity index 100% rename from .github/secrets/Dist_Bitwarden_2020.mobileprovision.gpg rename to .github/secrets/dist_bitwarden.mobileprovision.gpg diff --git a/.github/secrets/Dist_Extension_2020.mobileprovision.gpg b/.github/secrets/dist_extension.mobileprovision.gpg similarity index 100% rename from .github/secrets/Dist_Extension_2020.mobileprovision.gpg rename to .github/secrets/dist_extension.mobileprovision.gpg diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f84bb6e1a..063492033 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -137,6 +137,11 @@ jobs: MOBILE_KEY_PASSWORD: ${{ secrets.IOS_KEY_PASSWORD }} DIST_CERT_PASSWORD: ${{ secrets.IOS_DIST_CERT_PASSWORD }} + - name: Set up provisioning profiles + if: github.ref == 'refs/heads/master' + run: ./.github/scripts/ios/setup-profiles.ps1 + shell: pwsh + - name: Restore packages run: nuget restore