Skip to content

Commit

Permalink
add publish to VS marketplace and GitHub (#656)
Browse files Browse the repository at this point in the history
* add publish to VS marketplace and GitHub
  • Loading branch information
danfiedler-msft authored Nov 12, 2024
1 parent ad46ed1 commit f4aa2f7
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.47] - 2024-11-12
### Pipeline
Pipeline only changes

## [1.0.46] - 2024-11-05
### Pipeline
Pipeline only changes
Expand Down
40 changes: 39 additions & 1 deletion Pipelines/vs/devskim-visualstudio-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,42 @@ extends:
$name = $_.Name
$tmp = (Get-FileHash "$(Build.StagingDirectory)\$name").Hash
Add-Content $(Build.StagingDirectory)\HASHES.txt "$tmp`t$name"
}
}
- task: PowerShell@2
displayName: Move VS Marketplace Manifest
inputs:
targetType: 'inline'
script: 'mv $env:BUILD_SOURCESDIRECTORY/DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/publish.manifest.json $env:BUILD_STAGINGDIRECTORY/'
- task: PowerShell@2
displayName: Move Readme-gallery.md
inputs:
targetType: 'inline'
script: 'mv $env:BUILD_SOURCESDIRECTORY/DevSkim-DotNet/Microsoft.DevSkim.VisualStudio/Content/readme-gallery.md $env:BUILD_STAGINGDIRECTORY/'

- task: AzureCLI@2
displayName: 'Publishing with Managed Identity'
inputs:
azureSubscription: oss-vs-marketplace-publish-mi-connection
scriptType: "pscore"
scriptLocation: 'inlineScript'
inlineScript: |
$aadToken = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
Install-Module VSSetup -Force
$vsixPublisher = Join-Path -Path (Get-VSSetupInstance -All | Select-VSSetupInstance -Latest).installationPath -ChildPath "VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" -Resolve
$vsixPath = Resolve-Path $env:BUILD_STAGINGDIRECTORY\*.vsix -Relative
& $vsixPublisher publish -payload $vsixPath -publishManifest $(Build.StagingDirectory)/publish.manifest.json -personalAccessToken $aadToken -ignoreWarnings "VSIXValidatorWarning01,VSIXValidatorWarning02,VSIXValidatorWarning08"
workingDirectory: '$(Build.StagingDirectory)'
- task: GitHubRelease@1
displayName: Release to GitHub
inputs:
gitHubConnection: 'github.com_gfs'
repositoryName: 'microsoft/DevSkim'
action: 'create'
target: '$(Build.SourceVersion)'
tagSource: 'userSpecifiedTag'
tag: 'VS_v$(ReleaseVersion)'
title: 'DevSkim VS Extension v$(ReleaseVersion)'
assets: |
$(Build.StagingDirectory)/*.vsix
changeLogCompareToRelease: 'lastNonDraftRelease'
changeLogType: 'commitBased'

0 comments on commit f4aa2f7

Please sign in to comment.