-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.23 KB
/
cicd.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: CI/CD for VSCode Extension
on:
push:
branches:
tags:
- "*"
pull_request:
workflow_dispatch:
jobs:
git_check:
uses: ./.github/workflows/git_check.yaml
dprint_check:
uses: ./.github/workflows/dprint_check.yaml
package-and-publish-extension:
needs: [git_check, dprint_check]
name: Package and Publish VSCode Extension
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Install dependencies
run: npm install
- name: Install VSCE (CLI for managing VS Code extensions)
run: npm install -g @vscode/vsce
- name: Package Extension
run: vsce package
- name: Publish Extension to VSCode Marketplace
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
run: vsce publish --no-git-tag-version --no-update-package-json --pat $VSCE_PAT --skip-duplicate
- name: Upload Release to GitHub
uses: softprops/action-gh-release@v2
with:
files: "*.vsix"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}