Publish a Release
Update Package Version
-
Create a version bump feature branch
git checkout -b bump_version_v1.2.3 -
Update
CHANGELOG.mdin the project root -
Update any documentation that mentions the package version
-
Commit the changes to your local repository
git add . git commit -m 'some brief description of the changes' -
This library uses the package
bump-my-versionto automate its versioning, source.
For example, with the current configuration (in the pyproject.toml file), running the command
bump-my-version bump major|minor|patch
will:
* Increase the model major|minor|patch version in the file extra_model/__init__.py
* Increase the model major|minor|patch version in the test file tests/test_init.py
* Create a commit with the modified files and message Bump version: {old_version} → {new_version}
* Tag the last commit as v{new_version}
In order to perform a dry run for the command above, execute:
bump-my-version bump major|minor|patch -n --verbose
Please notice that the git working directory is expected to be clean when running bumpversion.
Choose the major|minor|patch argument according to the importance of the changes. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
After successfully running
bumpversion, please rungit push && git push --tagsto synchronize the local repository with the remote one. -
Create a PR. Upon approval of the PR, merge changes to the
mainbranch with the Github.com UI -
Pull down the changes merged to the
mainbranchgit checkout main; git pull
Publish Release with Github Action
-
Visit the
extra-modelrepository -
Under Releases in the right column, visit
Create a new release -
Enter the tag version you previously created in the
Tag versioninput, and make sure themainbranch is selected. Title and description are optional. -
Press Publish Release at the bottom.
-
Visit Actions in the top navigation of the Github.com UI
-
Visit on the most recent workflow run. This run represents the Github Action that is building, testing, and publshing the package release to PyPI.
-
The publish action requires approval before publishing to PyPI. Click Review Deployments on the right side of the yellow notification bar.
-
Select the Publish Release checkbox and click Approve and Deploy to unblock the deployment.
-
The package will now be built, tested, and depoyed to PyPI! The new package version will be live once the pipeline completes.