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 : Publish to NPM
2+
3+ on :
4+ release :
5+ types : [published]
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ uses : ./.github/workflows/build.yml
11+ with :
12+ python-version : ' 3.10'
13+ node-version : ' v18.16.0'
14+
15+ npm-publish :
16+ name : Upload release to NPM
17+ runs-on : ubuntu-latest
18+ environment :
19+ name : npm
20+ permissions :
21+ id-token : write
22+ contents : read
23+ needs : build
24+ steps :
25+ - uses : actions/setup-node@v4
26+ with :
27+ node-version : ' 20.x'
28+ registry-url : ' https://registry.npmjs.org'
29+ - name : Download npm package
30+ uses : actions/download-artifact@v4
31+ with :
32+ name : npm-package
33+ path : npm-dist/
34+ - name : Publish to npm
35+ run : |
36+ pushd npm-dist
37+ FILE=$(echo *.tgz)
38+ npm publish "$FILE" --provenance --access public
39+ popd
40+ env :
41+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
42+ shell : bash
Original file line number Diff line number Diff line change 1- name : Publish to PyPI & NPM
1+ name : Publish to PyPI
22
33on :
44 release :
3030 path : dist/
3131 - name : Publish package distributions to PyPI
3232 uses : pypa/gh-action-pypi-publish@release/v1
33-
34- - name : Download npm package
35- uses : actions/download-artifact@v4
36- with :
37- name : npm-package
38- path : npm-dist/
39- - uses : actions/setup-node@v4
40- with :
41- node-version : ' 20.x'
42- registry-url : ' https://registry.npmjs.org'
43- - name : Publish to npm
44- run : |
45- pushd npm-dist
46- FILE=$(echo *.tgz)
47- npm publish "$FILE" --provenance --access public
48- popd
49- env :
50- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
51- shell : bash
You can’t perform that action at this time.
0 commit comments