- Open a branch for the release
git checkout -b releases/1.5.0
- Update
CHANGELOG.md
with the most recent changes - Bump the version using
bump2version
:- Dry run first by running
bumpversion --dry-run --verbose --new-version <desired-version> <part>
. Some examples:- Release candidates:
--new-version 1.5.0rc1 num
- Alpha releases:
--new-version 1.5.0a1 num
- Patch releases:
--new-version 1.5.1 patch
- Minor releases:
--new-version 1.5.0 minor
- Major releases:
--new-version 2.0.0 major
- Release candidates:
- Actually modify the files:
bumpversion --no-tag --new-version <desired-version> <part>
. An example:- Minor releases:
bumpversion --no-tag --new-version 1.5.0 minor
- Minor releases:
- Dry run first by running
- Check the diff with
git diff
- Add the files that were changed with
git add --update
- Commit with message
Release dbt-mysql v<desired-version>
git push
- Merge back into
main
branch
- Build source distribution
python setup.py sdist bdist_wheel
- Deploy to Test PyPI
twine upload -r testpypi dist/*
- Check at https://test.pypi.org/project/dbt-mysql/
- Deploy to PyPI
twine upload dist/*
- Confirm at https://pypi.org/project/dbt-mysql/
PyPI recognizes pre-release versioning conventions and will label "pre-releases" as-such.
- Click the Create a new release link on the project homepage in GitHub
- Click the "Choose a tag" drop-down
- Type
v{semantic_version}
(e.g.,v1.5.0rc2
) and click "+ Create a new tag: {version} on publish"
- Type
- Update the "Target" to be the name of the release branch
- Type
dbt-mysql {semantic_version}
as the "release title" (e.g.dbt-mysql 1.5.0rc2
) - Leave the description blank
- For pre-releases:
- Tick the "This is a pre-release" checkbox
- Click the "Publish release" button
- Create
{minor-version}.latest
branch. Example: -git checkout -b 1.5.latest
- Update the branch names inrequirements-dev.txt
from@{previous-version}.latest
(or@main
) to@{minor-version}.latest
-git push
- Bump the version in
main
to be the next minor alpha. Example: -git checkout main
-git pull
-git checkout -b bump-1.6.0a1
- Minor releases:bumpversion --no-tag --new-version 1.6.0a1 num
- Update the branch names inrequirements-dev.txt
from@{previous-version}.latest
to@{minor-version}.latest
(or@main
) - Commit with messageBump dbt-mysql 1.6.0a1
-git push