Skip to content

Commit 411a9df

Browse files
committed
Try to fix publish
1 parent edbe417 commit 411a9df

3 files changed

Lines changed: 56 additions & 74 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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'

.github/workflows/publish.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -79,38 +79,4 @@ jobs:
7979
draft: false
8080
prerelease: false
8181
env:
82-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83-
84-
publish:
85-
needs: release
86-
runs-on: windows-latest
87-
88-
steps:
89-
- name: Checkout
90-
uses: actions/checkout@v2
91-
92-
- name: Create GitHub Deployment
93-
env:
94-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95-
run: |
96-
DEPLOYMENT_ID=$(gh api repos/${{ github.repository }}/deployments \
97-
-f ref=${{ github.sha }} \
98-
-f environment=production \
99-
-f required_contexts='[]' \
100-
--jq '.id')
101-
102-
- name: Publish release to marketplace
103-
id: publish
104-
uses: mrluje/vs-marketplace-publisher@v2
105-
with:
106-
pat: ${{ secrets.vs_pat }}
107-
manifestPath: .marketplace/publishManifest.json
108-
useLatestReleaseAsset: true
109-
110-
- name: Update Deployment Status
111-
env:
112-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113-
run: |
114-
gh api repos/${{ github.repository }}/deployments/${{ env.DEPLOYMENT_ID }}/statuses \
115-
-f state=success \
116-
-f environment_url=https://marketplace.visualstudio.com/items?itemName=ViktarKarpach.DebugAttachManager2022
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)