Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5869d96

Browse files
committedMay 3, 2024·
Replace vsce PAT with an Azure Credential
The latest version of the tool will use the Azure API to grab a token, it just needs to be run in a context where Azure CLI is authenticated. I think.
1 parent 9719cc0 commit 5869d96

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed
 

‎.pipelines/vscode-powershell-Official.yml

+14-12
Original file line numberDiff line numberDiff line change
@@ -190,21 +190,23 @@ extends:
190190
pool:
191191
type: windows
192192
variables:
193-
- group: VSCodeMarketplace
194-
- name: ob_outputDirectory
195-
value: $(Build.SourcesDirectory)/out
193+
ob_outputDirectory: $(Build.SourcesDirectory)/out
196194
steps:
197195
- download: current
198196
displayName: Download artifacts
199197
- pwsh: npm ci
200198
displayName: Install NPM packages (for vsce)
201-
- pwsh: |
202-
$publishArgs = @(
203-
'--pat'
204-
'$(token)'
205-
'--packagePath'
206-
'$(drop)/powershell-$(vsixVersion).vsix'
207-
if ([bool]::Parse('$(prerelease)')) { '--pre-release' }
208-
)
209-
npm run publish -- @publishArgs
199+
- task: AzureCLI@2
210200
displayName: Run vsce publish
201+
inputs:
202+
azureSubscription: vscode-marketplace
203+
scriptType: pscore
204+
scriptLocation: inlineScript
205+
inlineScript: |
206+
$publishArgs = @(
207+
'--azure-credential'
208+
'--packagePath'
209+
'$(drop)/powershell-$(vsixVersion).vsix'
210+
if ([bool]::Parse('$(prerelease)')) { '--pre-release' }
211+
)
212+
npm run publish -- @publishArgs

0 commit comments

Comments
 (0)
Please sign in to comment.