Skip to content

Commit ad46ed1

Browse files
add release vs prerelease publishing (#655)
1 parent e1d98d3 commit ad46ed1

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

Changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.0.46] - 2024-11-05
8+
### Pipeline
9+
Pipeline only changes
10+
711
## [1.0.45] - 2024-11-01
812
### Pipeline
913
Pipeline only changes

Pipelines/vscode/devskim-vscode-release.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,19 @@ extends:
135135

136136
- powershell: 'Get-ChildItem -Path ''$(Build.BinariesDirectory)'' -Recurse CodeSign* | foreach { Remove-Item -Path $_.FullName }'
137137
displayName: 'Delete Code Sign Summaries'
138+
138139
- task: PowerShell@2
139140
displayName: Move Plugin File
140141
inputs:
141142
targetType: 'inline'
142143
script: 'mv $env:BUILD_BINARIESDIRECTORY/Unsigned_Plugin/*.vsix $env:BUILD_STAGINGDIRECTORY/'
143144

145+
- task: CmdLine@2
146+
displayName: 'List files in StagingDirectory'
147+
inputs:
148+
script: dir /B
149+
workingDirectory: '$(Build.StagingDirectory)'
150+
144151
# Install dependencies and VS Code Extension Manager (vsce >= v2.26.1 needed)
145152
- script: |
146153
cd $(Build.StagingDirectory)
@@ -155,9 +162,19 @@ extends:
155162
azureSubscription: oss-vs-marketplace-publish-mi-connection
156163
scriptType: "pscore"
157164
scriptLocation: 'inlineScript'
165+
workingDirectory: '$(Build.StagingDirectory)'
158166
inlineScript: |
159-
cd $(Build.StagingDirectory)
160-
vsce publish --azure-credential
167+
$packPath = Resolve-Path $env:BUILD_STAGINGDIRECTORY\*.vsix
168+
if ("$(ReleaseVersion)".Contains("-"))
169+
{
170+
echo "Publishing as --pre-release = $(ReleaseVersion)"
171+
vsce publish --packagePath $packPath --pre-release --azure-credential
172+
}
173+
else
174+
{
175+
echo "Publishing as official release = $(ReleaseVersion)"
176+
vsce publish --packagePath $packPath --azure-credential
177+
}
161178
162179
- task: GitHubRelease@1
163180
displayName: Release to GitHub

0 commit comments

Comments
 (0)