File tree 1 file changed +39
-0
lines changed 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Package
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+ jobs :
7
+ deploy :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : actions/checkout@v2
11
+ - name : Install node
12
+ uses : actions/setup-node@v1
13
+ with :
14
+ node-version : ' 14.x'
15
+ registry-url : ' https://registry.npmjs.org'
16
+ - name : Install Python
17
+ uses : actions/setup-python@v2
18
+ with :
19
+ python-version : ' 3.x'
20
+ - name : Install dependencies
21
+ run : |
22
+ python -m pip install --upgrade pip
23
+ pip install twine wheel build
24
+ - name : Publish the Python package
25
+ env :
26
+ TWINE_USERNAME : __token__
27
+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
28
+ run : |
29
+ python -m build
30
+ twine upload dist/*
31
+ - name : Publish the NPM package
32
+ run : |
33
+ cd js
34
+ echo $PRE_RELEASE
35
+ if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi
36
+ npm publish --tag ${TAG} --access public
37
+ env :
38
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
39
+ PRE_RELEASE : ${{ github.event.release.prerelease }}
You can’t perform that action at this time.
0 commit comments