Skip to content

Commit 34b05d6

Browse files
authored
ci: create release of vscode extension (#4765)
1 parent 9fd2e5e commit 34b05d6

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release VSCode Extension
2+
on:
3+
push:
4+
tags:
5+
- 'vscode@v*'
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v4
12+
- name: Setup Node.js
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: '20'
16+
- name: Install pnpm
17+
uses: pnpm/action-setup@v2
18+
with:
19+
version: 10
20+
- name: Install dependencies
21+
run: pnpm install --frozen-lockfile
22+
- name: Extract version from tag
23+
id: extract_version
24+
run: |
25+
VERSION=${GITHUB_REF#refs/tags/vscode@v}
26+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
27+
- name: Update package.json version
28+
working-directory: vscode/extension
29+
run: |
30+
npm version ${{ steps.extract_version.outputs.VERSION }} --no-git-tag-version
31+
- name: Install dependencies
32+
working-directory: vscode/extension
33+
run: pnpm install
34+
- name: Run CI
35+
run: pnpm run ci
36+
- name: Build extension
37+
working-directory: vscode/extension
38+
run: pnpm run vscode:package
39+
- name: Upload extension to Marketplace
40+
working-directory: vscode/extension
41+
run: |
42+
pnpx vsce publish --packagePath sqlmesh-${{ steps.extract_version.outputs.VERSION }}.vsix
43+
env:
44+
VSCE_PAT: ${{ secrets.VSCE_PAT }}

0 commit comments

Comments
 (0)