-
-
Notifications
You must be signed in to change notification settings - Fork 485
Add GitHub release action to upload to PyPI & create GitHub release #980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4a7ba1a
to
c79fc52
Compare
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This secret will need to be set up in the repo or in the org (Org would be best to allow each of the stub packages to use it)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, looking cool!
- name: Publish package to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a comment: why __token__
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The username is just __token__
for an API token, not sure if you want to have that comment in the file.
See: https://packaging.python.org/en/latest/specifications/pypirc/#using-a-pypi-token
c79fc52
to
ce439a9
Compare
ce439a9
to
1f1c2cc
Compare
I re-ran the changes triggering the two actions: https://github.com/terencehonles/django-stubs/actions/runs/2449869912 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! I will try it tomorrow.
Thanks for working on this!
It would be great to have something similar for djangorestframework-stubs. If the test is successful, is anyone interested in porting this over to there? |
I can do it
|
Creating a release action as mentioned in #959
I have tested everything except the PyPI part (commented out in terencehonles@78924b8 and terencehonles@cc1e839) by pushing the tags
test-tag-failure
&test-tag-success
in my fork which created the relase https://github.com/terencehonles/django-stubs/releases/tag/test-tag-successRelated issues
I can open the PR in the other repos if this looks good.