Skip to content

Replace PAT with WIF in publish step #4984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; We use Dependabot to update our packages, so we want to add without a prefix
save-exact=true
; We download from a private feed during the release process
; We generally want to save install/update commands
save=true
; We use a public Azure Artifacts mirror
registry=https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/npm/registry/
always-auth=true
; We want the lockfile to reference the default registry
replace-registry-host=npmjs
; But we don't want references to it in the lockfile
omit-lockfile-registry-resolved=true
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
Loading