Skip to content

Commit e1d98d3

Browse files
add vscode ext release to github and marketplace (#653)
* add vscode ext release to github and marketplace
1 parent 10b85ce commit e1d98d3

File tree

2 files changed

+42
-5
lines changed

2 files changed

+42
-5
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.45] - 2024-11-01
8+
### Pipeline
9+
Pipeline only changes
10+
711
## [1.0.44] - 2024-11-01
812
### Pipeline
913
Pipeline only changes

Pipelines/vscode/devskim-vscode-release.yml

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ extends:
8686
inputs:
8787
buildType: 'current'
8888
artifactName: 'Unsigned_Plugin'
89-
targetPath: '$(System.ArtifactsDirectory)\Unsigned_Plugin'
89+
targetPath: '$(Build.BinariesDirectory)\Unsigned_Plugin'
9090
- task: AntiMalware@4
9191
displayName: Anti-Malware Scan
9292
inputs:
9393
InputType: 'Basic'
9494
ScanType: 'CustomScan'
95-
FileDirPath: '$(System.ArtifactsDirectory)'
95+
FileDirPath: '$(Build.BinariesDirectory)'
9696
EnableServices: true
9797
SupportLogOnError: true
9898
TreatSignatureUpdateFailureAs: 'Warning'
@@ -107,7 +107,7 @@ extends:
107107
AuthAKVName: 'oss-signing-vault'
108108
AuthCertName: 'oss-esrp-auth-cert'
109109
AuthSignCertName: 'oss-esrp-signing-cert'
110-
FolderPath: '$(System.ArtifactsDirectory)\Unsigned_Plugin'
110+
FolderPath: '$(Build.BinariesDirectory)\Unsigned_Plugin'
111111
Pattern: '*.vsix'
112112
signConfigType: 'inlineSignParams'
113113
inlineOperation: |
@@ -133,10 +133,43 @@ extends:
133133
MaxConcurrency: '50'
134134
MaxRetryAttempts: '5'
135135

136-
- powershell: 'Get-ChildItem -Path ''$(System.ArtifactsDirectory)'' -Recurse CodeSign* | foreach { Remove-Item -Path $_.FullName }'
136+
- powershell: 'Get-ChildItem -Path ''$(Build.BinariesDirectory)'' -Recurse CodeSign* | foreach { Remove-Item -Path $_.FullName }'
137137
displayName: 'Delete Code Sign Summaries'
138138
- task: PowerShell@2
139139
displayName: Move Plugin File
140140
inputs:
141141
targetType: 'inline'
142-
script: 'mv $env:SYSTEM_ARTIFACTSDIRECTORY/Unsigned_Plugin/*.vsix $env:BUILD_STAGINGDIRECTORY/'
142+
script: 'mv $env:BUILD_BINARIESDIRECTORY/Unsigned_Plugin/*.vsix $env:BUILD_STAGINGDIRECTORY/'
143+
144+
# Install dependencies and VS Code Extension Manager (vsce >= v2.26.1 needed)
145+
- script: |
146+
cd $(Build.StagingDirectory)
147+
npm install -g @vscode/vsce
148+
npm install
149+
displayName: "Install vsce and dependencies"
150+
151+
# Publish to marketplace
152+
- task: AzureCLI@2
153+
displayName: 'Publishing with Managed Identity'
154+
inputs:
155+
azureSubscription: oss-vs-marketplace-publish-mi-connection
156+
scriptType: "pscore"
157+
scriptLocation: 'inlineScript'
158+
inlineScript: |
159+
cd $(Build.StagingDirectory)
160+
vsce publish --azure-credential
161+
162+
- task: GitHubRelease@1
163+
displayName: Release to GitHub
164+
inputs:
165+
gitHubConnection: 'github.com_gfs'
166+
repositoryName: 'microsoft/DevSkim'
167+
action: 'create'
168+
target: '$(Build.SourceVersion)'
169+
tagSource: 'userSpecifiedTag'
170+
tag: 'VSCode_v$(ReleaseVersion)'
171+
title: 'DevSkim VS Code Extension v$(ReleaseVersion)'
172+
assets: |
173+
$(Build.StagingDirectory)/*.vsix
174+
changeLogCompareToRelease: 'lastNonDraftRelease'
175+
changeLogType: 'commitBased'

0 commit comments

Comments
 (0)