Skip to content
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

Setup Automatic Pypi uploads on release #137

Merged

Conversation

StoneT2000
Copy link
Member

No description provided.

@StoneT2000
Copy link
Member Author

needs 2 github secrets filled out

TEST_PYPI_API_TOKEN and PYPI_API_TOKEN

password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it mean any tagged version will be released? I am not sure whether it is a good option. Is there a reference for such Github actions?

@StoneT2000
Copy link
Member Author

This is now configured to only publish to pypi and testpypi on tagged commits. It will only publish to pypi if the tagged commit starts with a "v", which I have configured Github to protect that tag name, so only maintainers can add release tags starting with"v".

@xuanlinli17 xuanlinli17 merged commit 6f5b7af into main Oct 2, 2023
1 check passed
@xuanlinli17 xuanlinli17 deleted the setup-release-based-pypi-uploads-with-test-uploads-as-well branch October 2, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants