Skip to content

Commit 7de72fe

Browse files
authored
vscode: setup publishing in ci (#573)
1 parent 5ef94da commit 7de72fe

File tree

3 files changed

+310
-0
lines changed

3 files changed

+310
-0
lines changed

.github/workflows/rust.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,3 +330,38 @@ jobs:
330330

331331
- name: Check versions are consistent
332332
run: ./s/check-version
333+
334+
publish-vscode:
335+
if: startsWith(github.ref, 'refs/tags/')
336+
needs: [build]
337+
runs-on: ubuntu-22.04
338+
steps:
339+
- name: Checkout
340+
uses: actions/checkout@v4
341+
- name: Setup pnpm
342+
uses: pnpm/action-setup@v2
343+
with:
344+
version: 8
345+
- name: Setup node
346+
uses: actions/setup-node@v3
347+
with:
348+
node-version-file: "squawk-vscode/package.json"
349+
cache-dependency-path: "squawk-vscode/pnpm-lock.yaml"
350+
cache: "pnpm"
351+
- name: Install JS dependencies
352+
working-directory: "squawk-vscode"
353+
run: pnpm install
354+
355+
- name: Download all VS Code artifacts
356+
uses: actions/download-artifact@v4
357+
with:
358+
pattern: squawk-vscode-*
359+
path: ./dist
360+
361+
- name: Publish Extension (VS Code Marketplace)
362+
working-directory: ./squawk-vscode
363+
run: pnpm exec vsce publish --pat ${{ secrets.MARKETPLACE_TOKEN }} --packagePath ../dist/squawk-vscode-*/*.vsix
364+
# - name: Publish Extension (Open VSX)
365+
# working-directory: ./squawk-vscode
366+
# run: pnpm exec ovsx publish --pat ${{ secrets.OPENVSX_TOKEN }} --packagePath ../dist/squawk-vscode-*/*.vsix
367+
# timeout-minutes: 2

squawk-vscode/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"eslint": "^9.16.0",
9494
"globals": "^16.2.0",
9595
"npm-run-all": "^4.1.5",
96+
"ovsx": "^0.10.4",
9697
"prettier": "^3.6.2",
9798
"typescript": "^5.7.2",
9899
"typescript-eslint": "^8.35.0"

0 commit comments

Comments
 (0)