Skip to content

Commit f4aa2f7

Browse files
add publish to VS marketplace and GitHub (#656)
* add publish to VS marketplace and GitHub
1 parent ad46ed1 commit f4aa2f7

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
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.47] - 2024-11-12
8+
### Pipeline
9+
Pipeline only changes
10+
711
## [1.0.46] - 2024-11-05
812
### Pipeline
913
Pipeline only changes

Pipelines/vs/devskim-visualstudio-release.yml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,42 @@ extends:
147147
$name = $_.Name
148148
$tmp = (Get-FileHash "$(Build.StagingDirectory)\$name").Hash
149149
Add-Content $(Build.StagingDirectory)\HASHES.txt "$tmp`t$name"
150-
}
150+
}
151+
- task: PowerShell@2
152+
displayName: Move VS Marketplace Manifest
153+
inputs:
154+
targetType: 'inline'
155+
script: 'mv $env:BUILD_SOURCESDIRECTORY/DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/publish.manifest.json $env:BUILD_STAGINGDIRECTORY/'
156+
- task: PowerShell@2
157+
displayName: Move Readme-gallery.md
158+
inputs:
159+
targetType: 'inline'
160+
script: 'mv $env:BUILD_SOURCESDIRECTORY/DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/Content/readme-gallery.md $env:BUILD_STAGINGDIRECTORY/'
161+
162+
- task: AzureCLI@2
163+
displayName: 'Publishing with Managed Identity'
164+
inputs:
165+
azureSubscription: oss-vs-marketplace-publish-mi-connection
166+
scriptType: "pscore"
167+
scriptLocation: 'inlineScript'
168+
inlineScript: |
169+
$aadToken = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
170+
Install-Module VSSetup -Force
171+
$vsixPublisher = Join-Path -Path (Get-VSSetupInstance -All | Select-VSSetupInstance -Latest).installationPath -ChildPath "VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" -Resolve
172+
$vsixPath = Resolve-Path $env:BUILD_STAGINGDIRECTORY\*.vsix -Relative
173+
& $vsixPublisher publish -payload $vsixPath -publishManifest $(Build.StagingDirectory)/publish.manifest.json -personalAccessToken $aadToken -ignoreWarnings "VSIXValidatorWarning01,VSIXValidatorWarning02,VSIXValidatorWarning08"
174+
workingDirectory: '$(Build.StagingDirectory)'
175+
- task: GitHubRelease@1
176+
displayName: Release to GitHub
177+
inputs:
178+
gitHubConnection: 'github.com_gfs'
179+
repositoryName: 'microsoft/DevSkim'
180+
action: 'create'
181+
target: '$(Build.SourceVersion)'
182+
tagSource: 'userSpecifiedTag'
183+
tag: 'VS_v$(ReleaseVersion)'
184+
title: 'DevSkim VS Extension v$(ReleaseVersion)'
185+
assets: |
186+
$(Build.StagingDirectory)/*.vsix
187+
changeLogCompareToRelease: 'lastNonDraftRelease'
188+
changeLogType: 'commitBased'

0 commit comments

Comments
 (0)