1+ name : Deploy VSIX Extension
2+
3+ on :
4+ workflow_dispatch :
5+
6+ jobs :
7+ deploy :
8+ runs-on : windows-2022
9+
10+ steps :
11+ - name : Checkout
12+ uses : actions/checkout@v2
13+
14+ - name : Create GitHub deployment
15+ uses : chrnorm/deployment-action@v2
16+ id : deployment
17+ with :
18+ token : ' ${{ github.token }}'
19+ environment-url : https://marketplace.visualstudio.com/items?itemName=ViktarKarpach.DebugAttachManager2022
20+ environment : production
21+
22+ - name : Add path variable
23+ shell : pwsh
24+ run : |
25+ $visualStudioInstallation = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VSSDK -property installationPath
26+ $vsixPublisher = Join-Path $visualStudioInstallation 'VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe'
27+ & $vsixPublisher
28+ $vsixPublisherPath = Join-Path $visualStudioInstallation 'VSSDK\VisualStudioIntegration\Tools\Bin\'
29+ $env:PATH = "$vsixPublisherPath;$env:PATH"
30+
31+ - name : Publish release to marketplace
32+ id : publish
33+ uses : mrluje/vs-marketplace-publisher@v2
34+ with :
35+ pat : ${{ secrets.vs_pat }}
36+ manifestPath : .marketplace/publishManifest.json
37+ useLatestReleaseAsset : true
38+
39+ - name : Update deployment status (success)
40+ if : success()
41+ uses : chrnorm/deployment-status@v2
42+ with :
43+ token : ' ${{ github.token }}'
44+ environment-url : ${{ steps.deployment.outputs.environment_url }}
45+ deployment-id : ${{ steps.deployment.outputs.deployment_id }}
46+ state : ' success'
47+
48+ - name : Update deployment status (failure)
49+ if : failure()
50+ uses : chrnorm/deployment-status@v2
51+ with :
52+ token : ' ${{ github.token }}'
53+ environment-url : ${{ steps.deployment.outputs.environment_url }}
54+ deployment-id : ${{ steps.deployment.outputs.deployment_id }}
55+ state : ' failure'
0 commit comments