Publishing via tagging commits #47
Pinned
lfwa
announced in
Announcements
Replies: 2 comments
-
One caveat: I am not entirely sure how branching affects releases and whether the main page will show all releases even if they were created from a branch other than master. If they all do show up on main page, we might want to rethink how we publish to Test PyPi since tagging a commit with If anyone wants to experiment with this or have any suggestions, feel free to share. :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone (and welcome to our discussion board),
carbontracker has now been updated to using build and setuptools for building and packaging. This also means that we now store all project metadata in pyproject.toml.
To ease publishing, I have a created a new workflow that automatically builds carbontracker and distributes it on PyPi and Test PyPi when new releases are created. You can create a new release by tagging your commit with a version number such as
1.1.7
and it will then build and publish on PyPi. If you prepend the tag bytest-
, e.g.test-1.1.7
, then it will instead publish the build to Test PyPi.NOTE that this works on all branches, so REFRAIN from tagging your commits on other branches with version numbers that do not have the prefix
test-
since it will then be published on PyPi even if you are not working on themaster
branch.This change also means we no longer store any explicit version numbers in files such as the previous
__version__.py
: they are only stored in commit tags.How to: Create a release (and tag your commit) through GitHub web interface
test-1.1.7
and click "Create new tag on publish"This should automatically trigger the workflow that builds and publishes it.
Beta Was this translation helpful? Give feedback.
All reactions