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 : Download artifacts
23+ uses : dsaltares/fetch-gh-release-asset@master
24+ with :
25+ file : ' DebugAttachHistory.vsix'
26+
27+ - name : Publish release to marketplace
28+ shell : pwsh
29+ run : |
30+ $visualStudioInstallation = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VSSDK -property installationPath
31+ $vsixPublisher = Join-Path $visualStudioInstallation 'VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe'
32+ $ManifestPath = ".\.marketplace\publishManifest.json"
33+ $vsix = Get-ChildItem -File DebugAttachHistory.vsix -recurse | Select-Object -First 1 -ExpandProperty FullName
34+ & $vsixPublisher publish -payload $vsix -publishManifest $ManifestPath -personalAccessToken ${{ secrets.vs_pat }}
35+
36+ - name : Update deployment status (success)
37+ if : success()
38+ uses : chrnorm/deployment-status@v2
39+ with :
40+ token : ' ${{ github.token }}'
41+ environment-url : ${{ steps.deployment.outputs.environment_url }}
42+ deployment-id : ${{ steps.deployment.outputs.deployment_id }}
43+ state : ' success'
44+
45+ - name : Update deployment status (failure)
46+ if : failure()
47+ uses : chrnorm/deployment-status@v2
48+ with :
49+ token : ' ${{ github.token }}'
50+ environment-url : ${{ steps.deployment.outputs.environment_url }}
51+ deployment-id : ${{ steps.deployment.outputs.deployment_id }}
52+ state : ' failure'
0 commit comments