File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Reusable Release Workflow
2+
3+ on :
4+ workflow_call :
5+ secrets :
6+ NODE_AUTH_TOKEN :
7+ required : true
8+
9+ env :
10+ CI : true
11+ jobs :
12+ publish-npm :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+ - name : Prepare for publication to npm
17+ uses : actions/setup-node@v3
18+ with :
19+ node-version-file : " .nvmrc"
20+ registry-url : " https://registry.npmjs.org"
21+ cache : npm
22+ - run : npm ci
23+ - if : ${{ contains(github.ref_name, 'beta') }}
24+ run : npm publish --access public --tag beta
25+ env :
26+ NODE_AUTH_TOKEN : ${{ secrets.NODE_AUTH_TOKEN }}
27+ - if : ${{ contains(github.ref_name, 'alpha') }}
28+ run : npm publish --access public --tag alpha
29+ env :
30+ NODE_AUTH_TOKEN : ${{ secrets.NODE_AUTH_TOKEN }}
31+ - if : ${{ !contains(github.ref_name, 'alpha') && !contains(github.ref_name, 'beta') }}
32+ run : npm publish --access public
33+ env :
34+ NODE_AUTH_TOKEN : ${{ secrets.NODE_AUTH_TOKEN }}
You can’t perform that action at this time.
0 commit comments