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

feat: Automatic PyPI Publishing using Tags #148

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

PCain02
Copy link
Collaborator

@PCain02 PCain02 commented Oct 28, 2024

Automatic PyPI Publishing using Tags

Description

This PR adds the ability to publish to PyPI automatically when using tags. tag_publish.yml and test-publish.yml were the main targets of the PR. The lowercase t tag will be used for test publishing and the lowercase v tag is for real publishing. They should look like t0.7.1 and v0.7.1

The commands to use this are as follows where the version number is replaced with the next sequential version.

poetry version 0.3.1
git add pyproject.toml
git commit -m "Chore: Bump version to 0.3.1"
git tag t0.3.1
git push origin t0.3.1

You will know it worked if Test PyPI has updated the version number

Note: Do not use the v tag to test the PR because that will cause a new release which is not ideal.

Linked Issues

Closes: #137

Type of Change

  • Feature
  • Bug fix
  • Documentation

Contributors

@PCain02 PCain02 added the enhancement New feature or request label Oct 28, 2024
@PCain02 PCain02 self-assigned this Oct 31, 2024
@CalebKendra
Copy link
Collaborator

This PR needs a secret key to work in the publish.yml file.

I lack experience in Pypi and needed to approve this. Potentially another TL could help?

@rebekahrudd
Copy link
Collaborator

Should we test this in your fork?

I ran into issues because I was in your fork but then I couldn't push to your fork to test it. Here's my output:
pallas_tag feature

Copy link
Collaborator

@rebekahrudd rebekahrudd left a comment

Choose a reason for hiding this comment

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

This worked on Linux:
pypi

@AlishChhetri AlishChhetri self-requested a review November 7, 2024 20:18
@AlishChhetri
Copy link
Collaborator

@PCain02, please confirm that this feature works on macOS. I see you’ve tested it on Windows, and Rebekah confirmed it on Linux. We just need a macOS test to complete the cross-platform verification. The feature looks great, and I don’t see any issues with the implementation.

One question for clarification: does any instance of a v tag trigger a release to PyPI, or only when that tag is committed to the main branch? For instance, if someone on a feature branch uses a v tag, would it publish to PyPI without being merged into main?

Thank you for clarifying, and I apologize if it’s a basic question!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatic Release to PyPI Not Triggered
4 participants