Add automated release workflow#284
Conversation
| - name: Publish the Python package | ||
| env: | ||
| TWINE_USERNAME: __token__ | ||
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} |
There was a problem hiding this comment.
How are we supposed to generate and set this token?
| if [[ $PRE_RELEASE == "true" ]]; then export TAG="next"; else export TAG="latest"; fi | ||
| npm publish --tag ${TAG} --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
There was a problem hiding this comment.
Same question here I guess :)
There was a problem hiding this comment.
same as pypi except token created on npm.js instead of pypi
|
Thanks for the PR! |
|
Once the tokens are set then the release process becomes:
and it will even do the git tagging for you |
|
This is a near carbon copy of the juptyerlab-git version https://github.com/jupyterlab/jupyterlab-git/blob/master/.github/workflows/publish.yml |
|
I like more and more the idea of doing this. I would like to test it on a less-critical project first though. I might start with ipycanvas. |
Sensible. Feel free to just copy paste this PR over to there. Alternatively we can try it on ipycytoscape. I would have done that already (https://github.com/QuantStack/ipycytoscape/blob/master/.github/workflows/release.yml) but I don't have adequate permissions to add secrets to the repo |
|
Me neither. Maybe @marimeireles has those rights? |
|
I am not allowed to set up secrets on ipympl. Which makes sense. @tacaswell would you be able to create the secret tokens for publishing to PyPi and npmjs? I'll do the next release manually. |
|
Sorry, I missed this. |
|
Hi @tacaswell would you be ok with adding the necessary secrets? This would make it super easy to do things like release immediately after merging: #310 Also fwiw |
|
Automated releases have been tested out for both ipycanvas and jupyterlab-sidecar now and seems to work for both. |
|
I suspect I have access to add the secrets on the GH side, but do not have access to get them on the pypi side! That said, if I can, I am happy to pull levers and push buttons as required. |
|
The tests won't detect anything here. So going with a merge. Only way to check is to try releasing. |
|
Need to add automated release call flow |


This would allow the building of the wheel and the uploads to pypi and NPM to happen automatically on making a new release on github.
If this gets merged then someone with rights to publish to those platforms will need to generate an API key and add it to this repos secrets.
again @martinRenou (sorry for sudden spam :/) but i'm hoping this one can make your life a bit easier when releasing :)