From 10ea49bf02b9e63ebcf094fc91e0ee8d8bf89caa Mon Sep 17 00:00:00 2001 From: Albie Date: Wed, 8 Feb 2023 16:10:34 +0000 Subject: [PATCH] inline storebroker auth in steps where used --- .github/workflows/deploy.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 071ba2d..a0fc5bc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -184,11 +184,6 @@ jobs: Set-ExecutionPolicy RemoteSigned -Force Install-Module -Name StoreBroker -Force Import-Module StoreBroker - - $clientSecret = echo $Env:AADSecret | ConvertTo-SecureString -AsPlainText -Force - $clientCredentials = New-Object System.Management.Automation.PSCredential "$Env:AADClient", $clientSecret - - Set-StoreBrokerAuthentication -TenantId "$Env:AADTenant" -Credential $clientCredentials env: AADSecret: ${{ secrets.AAD_SECRET }} AADClient: ${{ secrets.AAD_CLIENT }} @@ -245,8 +240,18 @@ jobs: - name: Flight package (beta) if: ${{ github.event.release.prerelease }} - run: Update-ApplicationFlightSubmission -AppId 9N88CQPKGS15 -FlightId 203522cc-6c4a-42a0-8080-de225fb1ee74 -SubmissionDataPath .\dragon6-winstore.json -PackagePath .\dragon6-winstore.zip -AutoCommit -Force -ReplacePackages -TargetPublishMode Immediate + run: | + $clientSecret = echo $Env:AADSecret | ConvertTo-SecureString -AsPlainText -Force + $clientCredentials = New-Object System.Management.Automation.PSCredential "$Env:AADClient", $clientSecret + + Set-StoreBrokerAuthentication -TenantId "$Env:AADTenant" -Credential $clientCredentials + Update-ApplicationFlightSubmission -AppId 9N88CQPKGS15 -FlightId 203522cc-6c4a-42a0-8080-de225fb1ee74 -SubmissionDataPath .\dragon6-winstore.json -PackagePath .\dragon6-winstore.zip -AutoCommit -Force -ReplacePackages -TargetPublishMode Immediate - name: Submit to Windows Store if: ${{ !github.event.release.prerelease }} - run: Update-ApplicationSubmission -AppId 9N88CQPKGS15 -SubmissionDataPath .\dragon6-winstore.json -PackagePath .\dragon6-winstore.zip -AutoCommit -Force -AddPackages -UpdatePublishModeAndVisibility -UpdateListings -UpdateNotesForCertification + run: | + $clientSecret = echo $Env:AADSecret | ConvertTo-SecureString -AsPlainText -Force + $clientCredentials = New-Object System.Management.Automation.PSCredential "$Env:AADClient", $clientSecret + + Set-StoreBrokerAuthentication -TenantId "$Env:AADTenant" -Credential $clientCredentials + Update-ApplicationSubmission -AppId 9N88CQPKGS15 -SubmissionDataPath .\dragon6-winstore.json -PackagePath .\dragon6-winstore.zip -AutoCommit -Force -AddPackages -UpdatePublishModeAndVisibility -UpdateListings -UpdateNotesForCertification