-
Notifications
You must be signed in to change notification settings - Fork 16
49 lines (37 loc) · 1.08 KB
/
cicd.yaml
File metadata and controls
49 lines (37 loc) · 1.08 KB
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
name: Release and publish
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install the dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump version
run: |
npm version patch -m "chore: release v%s [skip ci]"
- name: Push version bump and tag
run: git push origin main --follow-tags
- name: Install vsce
run: npm i -g @vscode/vsce
- name: Package extension
run: vsce package
- name: Publish to marketplace
run: vsce publish -p "$PERSONAL_ACCESS_TOKEN"
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.VSCE_PAT }}