Skip to content

Commit

Permalink
add release vs prerelease publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
danfiedler-msft committed Nov 6, 2024
1 parent c0b0876 commit 7260b46
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions Pipelines/vscode/devskim-vscode-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ extends:
targetType: 'inline'
script: 'mv $env:BUILD_BINARIESDIRECTORY/Unsigned_Plugin/*.vsix $env:BUILD_STAGINGDIRECTORY/'

- task: PowerShell@2
displayName: Move package.json File
- task: CmdLine@2
displayName: 'List files in StagingDirectory'
inputs:
targetType: 'inline'
script: 'mv $env:BUILD_SOURCESDIRECTORY/DevSkim-VSCode-Plugin/*.json $env:BUILD_STAGINGDIRECTORY/'
script: dir /B
workingDirectory: '$(Build.StagingDirectory)'

# Install dependencies and VS Code Extension Manager (vsce >= v2.26.1 needed)
- script: |
Expand All @@ -162,9 +162,19 @@ extends:
azureSubscription: oss-vs-marketplace-publish-mi-connection
scriptType: "pscore"
scriptLocation: 'inlineScript'
workingDirectory: '$(Build.StagingDirectory)'
inlineScript: |
cd $(Build.StagingDirectory)
vsce publish --azure-credential
$packPath = Resolve-Path $env:BUILD_STAGINGDIRECTORY\*.vsix
if ("$(ReleaseVersion)".Contains("-"))
{
echo "Publishing as --pre-release = $(ReleaseVersion)"
vsce publish --packagePath $packPath --pre-release --azure-credential
}
else
{
echo "Publishing as official release = $(ReleaseVersion)"
vsce publish --packagePath $packPath --azure-credential
}
- task: GitHubRelease@1
displayName: Release to GitHub
Expand Down

0 comments on commit 7260b46

Please sign in to comment.