Skip to content

Commit 27b4f7c

Browse files
[ci] add a job to publish the extension to the Visual Studio Marketplace
Signed-off-by: Marc Dumais <[email protected]>
1 parent 37fd531 commit 27b4f7c

File tree

1 file changed

+35
-3
lines changed

1 file changed

+35
-3
lines changed

.github/workflows/ci-cd.yml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ jobs:
5959
- name: Run format check
6060
run: yarn format:check
6161

62-
publish:
63-
name: Publish extension to openvsx.org
62+
publish-oxsv:
63+
# https://open-vsx.org/
64+
name: Publish extension to public Open VSX Registry
6465
runs-on: ${{ matrix.os }}
6566
needs:
6667
- build-test
@@ -90,4 +91,35 @@ jobs:
9091
# have ovsx consume the PAT from environment - if it's not handled explicitly
9192
# in the workflow, less risk to leak it
9293
OVSX_PAT: ${{ secrets.OPEN_VSX_TOKEN }}
93-
94+
95+
publish-vs-marketplace:
96+
# https://marketplace.visualstudio.com/
97+
name: Publish extension to Visual Studio Marketplace
98+
runs-on: ${{ matrix.os }}
99+
needs:
100+
- build-test
101+
strategy:
102+
matrix:
103+
os: [ubuntu-latest]
104+
node-version: [16]
105+
# Only execute when the trigger was a tag (new release)
106+
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags/v')
107+
108+
steps:
109+
- uses: actions/checkout@v3
110+
- uses: actions/download-artifact@v4
111+
with:
112+
name: extension
113+
- uses: actions/setup-node@v3
114+
with:
115+
node-version: ${{ matrix.node-version }}
116+
- name: Install dependencies
117+
run: yarn --frozen-lockfile --ignore-scripts
118+
- name: Publish extension
119+
run: |
120+
ls -al vscode-trace-server-*.vsix
121+
npx vsce publish -i vscode-trace-server-*.vsix --skip-duplicate
122+
env:
123+
# have vsce consume the PAT from environment - if it's not handled explicitly
124+
# in the workflow, less risk to leak it
125+
VSCE_PAT: ${{ secrets.VS_MARKETPLACE_TOKEN }}

0 commit comments

Comments
 (0)