-
Notifications
You must be signed in to change notification settings - Fork 8
52 lines (44 loc) · 2.01 KB
/
deploy.yml
File metadata and controls
52 lines (44 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Deploy VSIX Extension
on:
workflow_dispatch:
jobs:
deploy:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create GitHub deployment
uses: chrnorm/deployment-action@v2
id: deployment
with:
token: '${{ github.token }}'
environment-url: https://marketplace.visualstudio.com/items?itemName=ViktarKarpach.DebugAttachManager2022
environment: production
- name: Download artifacts
uses: dsaltares/fetch-gh-release-asset@master
with:
file: 'DebugAttachHistory.vsix'
- name: Publish release to marketplace
shell: pwsh
run: |
$visualStudioInstallation = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VSSDK -property installationPath
$vsixPublisher = Join-Path $visualStudioInstallation 'VSSDK\VisualStudioIntegration\Tools\Bin\VsixPublisher.exe'
$ManifestPath = ".\.marketplace\publishManifest.json"
$vsix = Get-ChildItem -File DebugAttachHistory.vsix -recurse | Select-Object -First 1 -ExpandProperty FullName
& $vsixPublisher publish -payload $vsix -publishManifest $ManifestPath -personalAccessToken ${{ secrets.vs_pat }}
- name: Update deployment status (success)
if: success()
uses: chrnorm/deployment-status@v2
with:
token: '${{ github.token }}'
environment-url: ${{ steps.deployment.outputs.environment_url }}
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
state: 'success'
- name: Update deployment status (failure)
if: failure()
uses: chrnorm/deployment-status@v2
with:
token: '${{ github.token }}'
environment-url: ${{ steps.deployment.outputs.environment_url }}
deployment-id: ${{ steps.deployment.outputs.deployment_id }}
state: 'failure'