Skip to content

Commit dd7450e

Browse files
committed
ci: publish automatically
Closes #121
1 parent 26c75b0 commit dd7450e

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
os: [ macos-latest, ubuntu-latest, windows-latest ]
11-
node-version: [ 16 ]
11+
node-version: [ 20 ]
1212

1313
runs-on: ${{ matrix.os }}
1414

.github/workflows/RELEASE.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
name: release
6+
jobs:
7+
release-please:
8+
outputs:
9+
release_created: ${{ steps.release.outputs.release_created }}
10+
permissions:
11+
contents: write # to create release commit (google-github-actions/release-please-action)
12+
pull-requests: write # to create release PR (google-github-actions/release-please-action)
13+
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: google-github-actions/release-please-action@v3
17+
id: release
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
release-type: node
21+
pull-request-title-pattern: 'chore: release v${version}'
22+
changelog-types: '[{"type":"feat","section":"Features","hidden":false},{"type":"fix","section":"Bug Fixes","hidden":false},{"type":"deps","section":"Dependency Updates","hidden":false}]'
23+
changelog-notes-type: github
24+
25+
publish:
26+
needs: release-please
27+
if: ${{ needs.release-please.outputs.release_created }}
28+
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
- name: Use Node.js
34+
uses: actions/setup-node@v3
35+
with:
36+
node-version: 20
37+
cache: 'npm'
38+
- name: Install dependencies
39+
run: npm ci
40+
- run: npx @vscode/vsce publish
41+
env:
42+
VSCE_PAT: ${{ secrets.MARKETPLACE_TOKEN }}
43+

0 commit comments

Comments
 (0)