Skip to content

Commit 1c72570

Browse files
committed
Add GitHub Action for automatic extension builds on tag push
1 parent 5a20dc7 commit 1c72570

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build and Release Extension
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '22.x'
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build extension
25+
run: npm run compile
26+
27+
- name: Package extension
28+
run: npx @vscode/vsce package --no-dependencies
29+
30+
- name: Get version from tag
31+
id: get_version
32+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
33+
34+
- name: Create Release
35+
uses: softprops/action-gh-release@v2
36+
with:
37+
files: vertex-devcode-*.vsix
38+
body: |
39+
## Vertex DevCode ${{ github.ref_name }}
40+
41+
### Installation
42+
Download `vertex-devcode-${{ steps.get_version.outputs.VERSION }}.vsix` and install:
43+
```bash
44+
code --install-extension vertex-devcode-${{ steps.get_version.outputs.VERSION }}.vsix
45+
```
46+
47+
### Changes
48+
See commit history for details.
49+
draft: false
50+
prerelease: false
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)