File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-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
+
7
+ jobs :
8
+ deploy :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - name : Install node
13
+ uses : actions/setup-node@v1
14
+ with :
15
+ node-version : ' 12.x'
16
+ registry-url : ' https://registry.npmjs.org'
17
+ - name : Install Python
18
+ uses : actions/setup-python@v2
19
+ with :
20
+ python-version : ' 3.x'
21
+ - name : Install dependencies
22
+ run : |
23
+ python -m pip install --upgrade pip build twine jupyterlab
24
+ - name : Build the federated extension in a separated build environment
25
+ run : |
26
+ python -m build
27
+ - name : Publish the Python package
28
+ env :
29
+ TWINE_USERNAME : __token__
30
+ TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }}
31
+ run : |
32
+ twine upload dist/*
33
+ - name : Build the source extension
34
+ run : |
35
+ jlpm
36
+ jlpm build
37
+ - name : Publish the NPM package
38
+ run : |
39
+ echo $PRE_RELEASE
40
+ if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi
41
+ npm publish --tag ${TAG} --access public
42
+ env :
43
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
44
+ PRE_RELEASE : ${{ github.event.release.prerelease }}
You can’t perform that action at this time.
0 commit comments