Skip to content

Commit ef578c6

Browse files
committed
Create deploy.yml
1 parent c1e14c9 commit ef578c6

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/deploy.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Deploy Extension
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "20"
20+
21+
- name: Install dependencies
22+
run: npm run install-deps
23+
24+
- name: Bump version to match tag
25+
run: |
26+
echo "Bumping version to match tag ${{ github.ref }}"
27+
TAG_VERSION=${GITHUB_REF##*/}
28+
npm version $TAG_VERSION --no-git-tag-version
29+
30+
- name: Build and Package
31+
run: npm run vscode:bundle
32+
33+
- name: Publish to VSCode Marketplace
34+
env:
35+
VSCE_PAT: ${{ secrets.VS_TOKEN }} # Use the marketplace token stored in GitHub Secrets
36+
run: npm run vscode:publish
37+
38+
- name: Create GitHub Release
39+
id: create_release
40+
uses: softprops/action-gh-release@v1
41+
with:
42+
files: "*.vsix" # Uploads files ending with .vsix
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatically provided by GitHub Actions

0 commit comments

Comments
 (0)