Skip to content

Commit

Permalink
Add additional publish step for publishing kepler-jupyter to NPM
Browse files Browse the repository at this point in the history
  • Loading branch information
lixun910 committed Aug 20, 2021
1 parent f438ccd commit 46e84f3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/build-publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,25 @@ jobs:
name: keplergl-pypi
path: bindings/kepler.gl-jupyter/dist/

- name: Publish Pypi
if: github.event_name == 'release' && github.event.action == 'created'
- name: Check Release Tag
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+-jupyter$ ]]; then
echo ::set-output name=publish::true
fi
- name: Publish KeplerGL to Pypi
if: steps.check-tag.outputs.publish == 'true'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.npm_token }}
TWINE_PASSWORD: ${{ secrets.pypi_token }}
run: |
python -m twine upload bindings/kepler.gl-jupyter/dist/*.tar.gz
- name: Publish kepler-jupyter to NPM
if: steps.check-tag.outputs.publish == 'true'
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
run: |
cd bindings/kepler.gl-jupyter/js
npm publish
2 changes: 1 addition & 1 deletion bindings/kepler.gl-jupyter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ The output of the jupyter labextension is defined in the file `js/package.json`:

Then, you can either install this labextension to test it:
```shell
jupyter labextension install @jupyter-widgets/jupyterlab-manager keplergl-jupyter
jupyter labextension install .
```
or, you can manually create a symbolic link for the folder `bindings/kepler.gl-jupyter/kepler-jupyter/labextension` under the jupyter's folder `labextensions`, e.g. `/Users/test/opt/anaconda3/envs/test37/share/jupyter/labextensions`. You will need to reload the jupyter lab page.

Expand Down

0 comments on commit 46e84f3

Please sign in to comment.