Skip to content

Commit

Permalink
Replace vsce PAT with an Azure Credential
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
andyleejordan committed May 3, 2024
1 parent e09e8d5 commit 5d749c1
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .pipelines/vscode-powershell-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,21 +190,23 @@ extends:
pool:
type: windows
variables:
- group: VSCodeMarketplace
- name: ob_outputDirectory
value: $(Build.SourcesDirectory)/out
ob_outputDirectory: $(Build.SourcesDirectory)/out
steps:
- download: current
displayName: Download artifacts
- pwsh: npm ci
displayName: Install NPM packages (for vsce)
- pwsh: |
$publishArgs = @(
'--pat'
'$(token)'
'--packagePath'
'$(drop)/powershell-$(vsixVersion).vsix'
if ([bool]::Parse('$(prerelease)')) { '--pre-release' }
)
npm run publish -- @publishArgs
- task: AzureCLI@2
displayName: Run vsce publish
inputs:
azureSubscription: vscode-marketplace
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
$publishArgs = @(
'--azure-credential'
'--packagePath'
'$(drop)/powershell-$(vsixVersion).vsix'
if ([bool]::Parse('$(prerelease)')) { '--pre-release' }
)
npm run publish -- @publishArgs

0 comments on commit 5d749c1

Please sign in to comment.