File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : release
2+
3+ # Run action on every commit to main, release only when requested through commit annotation.
4+ on :
5+ push :
6+ branches : [master]
7+
8+ jobs :
9+ publish-npm :
10+ runs-on : ubuntu-latest
11+
12+ env :
13+ HUSKY : 0
14+ NODE_VERSION : 24.x
15+
16+ permissions :
17+ id-token : write # Required to mint token for npm package provenance
18+ contents : write # Needed to create and write release notes in GitHub release
19+
20+ steps :
21+ - name : Checkout Project
22+ uses : actions/checkout@v4
23+ with :
24+ fetch-depth : 0
25+
26+ - name : Use Node.js ${{ env.NODE_VERSION }}
27+ uses : actions/setup-node@v4
28+ with :
29+ node-version : ${{ env.NODE_VERSION }}
30+
31+ - name : Install Dependencies
32+ run : npm install
33+
34+ - name : Lint Files
35+ run : npm run lint
36+
37+ - name : Build Project
38+ run : npm run build
39+
40+ - name : Run Tests
41+ env :
42+ CI : true
43+ run : npm run test
44+
45+ - name : Publish to NPM
46+ uses : JS-DevTools/npm-publish@v3
47+ with :
48+ token : ${{ secrets.NPM_TOKEN }}
49+ provenance : true
Original file line number Diff line number Diff line change 8484 " text" ,
8585 " lcov"
8686 ]
87+ },
88+ "release" : {
89+ "branches" : [" master" ],
90+ "tagFormat" : " ${version}"
91+ },
92+ "publishConfig" : {
93+ "provenance" : true
8794 }
8895}
You can’t perform that action at this time.
0 commit comments