File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI & Publish
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+ workflow_dispatch :
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+ - uses : actions/setup-node@v4
16+ with :
17+ node-version : ' 20'
18+ cache : ' npm'
19+ - run : npm ci
20+
21+ publish :
22+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
23+ needs : test
24+ runs-on : ubuntu-latest
25+ steps :
26+ - uses : actions/checkout@v4
27+ - uses : actions/setup-node@v4
28+ with :
29+ node-version : ' 20'
30+ registry-url : ' https://registry.npmjs.org/'
31+ - run : npm ci
32+ - run : npm run build --if-present
33+ - run : npm publish --access public
34+ env :
35+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
You can’t perform that action at this time.
0 commit comments