Skip to content

Commit e63bab1

Browse files
committed
Publish to marketplace
1 parent 558fb38 commit e63bab1

5 files changed

Lines changed: 41 additions & 1 deletion

File tree

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"cSpell.words": [
3+
"jjones",
4+
"repo",
5+
"visualstudio"
6+
]
7+
}

azure-pipelines.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# IMPORTANT: Set variable `marketplace.token` to PAT for accessing the Visual
2+
# Studio Marketplace.
3+
14
trigger:
25
batch: true
36
branches:
@@ -44,3 +47,9 @@ steps:
4447
tag: 'v$(vsix.version)'
4548
title: 'Version $(vsix.version)'
4649
assets: '$(vsix)'
50+
51+
- task: PowerShell@2
52+
inputs:
53+
filePath: '$(Build.SourcesDirectory)\scripts\PublishVsix.ps1'
54+
env:
55+
MARKETPLACE_TOKEN: $(marketplace.token)

scripts/GetVersion.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[xml]$vsix = Get-Content $PSScriptRoot\..\src\GtmExtension\source.extension.vsixmanifest
1+
[xml]$vsix = Get-Content "$PSScriptRoot\..\src\GtmExtension\source.extension.vsixmanifest"
22
$version = $vsix.PackageManifest.Metadata.Identity.Version
33
Write-Host "##vso[task.setvariable variable=vsix.version]$version"

scripts/PublishVsix.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$VisualStudio = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -prerelease -format json | ConvertFrom-Json
2+
$VsixPublisher = Join-Path -Path $VisualStudio.installationPath -ChildPath "VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe" -Resolve
3+
& $VsixPublisher publish -payload $env:vsix -publishManifest "$PSScriptRoot\vsix-publish.json" -personalAccessToken $env:MARKETPLACE_TOKEN

vsix-publish.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "http://json.schemastore.org/vsix-publish",
3+
"categories": [
4+
"Coding",
5+
"Reporting",
6+
"Team Development"
7+
],
8+
"identity": {
9+
"internalName": "gtm.visualstudio.plugin",
10+
"tags": [
11+
"gtm"
12+
],
13+
"language": "en-US"
14+
},
15+
"overview": "README.md",
16+
"priceCategory": "free",
17+
"publisher": "jjones",
18+
"private": false,
19+
"qna": true,
20+
"repo": "https://github.com/jjonescz/gtm-visualstudio-plugin"
21+
}

0 commit comments

Comments
 (0)