Skip to content

Commit 2d98095

Browse files
committed
feat(visual-studio) : add workflow for marketplace deployment
1 parent c5ede86 commit 2d98095

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

.github/workflows/publish-visualstudio.yml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Visual Studio Extension (GitHub only)
1+
name: Publish Visual Studio Extension
22

33
on:
44
push:
@@ -58,3 +58,29 @@ jobs:
5858
2. Double-click it (or use **Extensions → Manage Extensions → Install from VSIX…**)
5959
3. Restart Visual Studio
6060
generate_release_notes: true
61+
62+
- name: Publish to Visual Studio Marketplace
63+
shell: pwsh
64+
env:
65+
# Réutilise le PAT Azure DevOps déjà utilisé pour VS Code (scope Marketplace › Manage,
66+
# compte propriétaire du publisher "devglobe"). Même type de token, même marketplace.
67+
MARKETPLACE_PAT: ${{ secrets.VSCE_PAT }}
68+
run: |
69+
# Locate VsixPublisher.exe (ships with the VS SDK component) via vswhere.
70+
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
71+
$vsRoot = & $vswhere -latest -prerelease -property installationPath
72+
$publisher = Join-Path $vsRoot "VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe"
73+
if (-not (Test-Path $publisher)) {
74+
Write-Error "VsixPublisher.exe not found at $publisher"
75+
exit 1
76+
}
77+
Write-Host "Using VsixPublisher: $publisher"
78+
79+
& $publisher publish `
80+
-payload "${{ steps.vsix.outputs.path }}" `
81+
-publishManifest "publishManifest.json" `
82+
-personalAccessToken $env:MARKETPLACE_PAT
83+
if ($LASTEXITCODE -ne 0) {
84+
Write-Error "VsixPublisher publish failed with exit code $LASTEXITCODE"
85+
exit $LASTEXITCODE
86+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "http://json.schemastore.org/vsix-publish",
3+
"categories": [ "coding", "other" ],
4+
"identity": {
5+
"internalName": "DevGlobe"
6+
},
7+
"overview": "README.md",
8+
"priceCategory": "free",
9+
"publisher": "devglobe",
10+
"private": false,
11+
"qnaEnabled": true,
12+
"repo": "https://github.com/Nako0/devglobe-extension"
13+
}

0 commit comments

Comments
 (0)