File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish to npm
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v5
12+ - uses : actions/setup-node@v4
13+ with :
14+ node-version : 22
15+ - run : npm ci --ignore-scripts
16+ - run : npm run lint
17+ - run : npm test
18+
19+ publish-npm :
20+ needs : build
21+ runs-on : ubuntu-latest
22+ permissions :
23+ id-token : write
24+ steps :
25+ - uses : actions/checkout@v5
26+ - uses : actions/setup-node@v4
27+ with :
28+ node-version : 22.x
29+ registry-url : ' https://registry.npmjs.org'
30+ cache : ' npm'
31+ - run : npm i -g npm@latest
32+ - run : npm ci --ignore-scripts
33+ - run : npm version ${TAG_NAME} --git-tag-version=false
34+ env :
35+ TAG_NAME : ${{ github.ref_name }}
36+ - run : npm publish --provenance --access public --tag next
37+ if : " github.event.release.prerelease"
38+ - run : npm publish --provenance --access public
39+ if : " !github.event.release.prerelease"
You can’t perform that action at this time.
0 commit comments