Skip to content

Commit 981c931

Browse files
committed
update ci
1 parent ce02400 commit 981c931

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
name: CI
1+
name: Publish package to npmjs
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- master
4+
release:
5+
types: [published]
86

97
concurrency:
108
group: ${{ github.workflow }}-${{ github.ref }}
@@ -14,6 +12,10 @@ jobs:
1412
ci:
1513
runs-on: ubuntu-latest
1614

15+
permissions:
16+
contents: read
17+
id-token: write
18+
1719
steps:
1820
- uses: actions/checkout@v4
1921

@@ -23,7 +25,7 @@ jobs:
2325
- name: Use Node.js
2426
uses: actions/setup-node@v4
2527
with:
26-
node-version: '20'
28+
node-version: '20.x'
2729
registry-url: 'https://registry.npmjs.org'
2830
cache: 'pnpm'
2931

@@ -32,3 +34,7 @@ jobs:
3234

3335
- name: Run CI
3436
run: npm run ci
37+
38+
- run: npm publish --provenance --access public
39+
env:
40+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.devcontainer/
2+
.vscode/
23
dist/
34
node_modules/

0 commit comments

Comments
 (0)