Skip to content

Commit 152414b

Browse files
committed
Update publish step to handle pre-release
1 parent 1c09990 commit 152414b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.vsts-ci/templates/publish-markets.yml

+9-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ steps:
77

88
- pwsh: |
99
npm ci --loglevel=error
10-
npm run publish -- --packagePath $(Pipeline.Workspace)/vscode-powershell/powershell-*.vsix --pat $(VsceToken)
10+
$PackageJson = Get-Content -Raw $(Build.SourcesDirectory)/package.json | ConvertFrom-Json
11+
$publishArgs = @(
12+
if ($PackageJson.preview) { "--pre-release" }
13+
"--packagePath"
14+
"$(Pipeline.Workspace)/vscode-powershell/powershell-*.vsix"
15+
"--pat"
16+
"$(VsceToken)"
17+
)
18+
npm run publish -- @publishArgs
1119
displayName: Publishing VSIX to VS Code Marketplace
1220

1321
# NOTE: We rarely update this script, so we can ignore errors from the gallery

0 commit comments

Comments
 (0)