- Open a branch for the release
git checkout -b releases/{semantic_version}
- Update
CHANGELOG.md
with the most recent changes - Bump the version using
bump2version
:- Dry run first by running
bumpversion --dry-run --verbose --new-version ``git branch --show-current | cut -f 2 -d "/"`` <part>
. Some examples:- Release candidates:
--new-version 0.10.2rc1 num
- Alpha releases:
--new-version 0.10.2a1 num
- Patch releases:
--new-version 0.10.2.1 patch
- Minor releases:
--new-version 0.11.0.1 minor
- Major releases:
--new-version 1.0.0.1 major
- Release candidates:
- Actually modify the files:
bumpversion --no-tag --new-version ``git branch --show-current | cut -f 2 -d "/"`` <part>
- Check the diff with
git diff
- Add the files that were changed with
git add --update
- Commit with message
Release dbt-mysql-adapter v<desired-version>
- Dry run first by running
- Push the branch to GitHub
git push -u origin releases/{semantic_version}
- Create a Pull Request for it, and merge it.
- Create a tag after the merge
git checkout master
git pull
git tag v{semantic_version}
- Push the release tag
git push origin tag v{semantic_version}
- Create a new release in Github
- Click the Create a new release link on the project homepage in GitHub
- Choose the created tag
- Type
dbt-mysql-adapter {semantic_version}
as the "release title" (e.g.dbt-mysql-adapter 0.19.0
) - For pre-releases:
- leave the description blank
- Tick the "this is a pre-release" checkbox
- Click the "publish release" button
- Deploy to PyPI.
- Delete release branch
git branch -d releases/{semantic_version}
- Build source distribution
poetry build
- Deploy to Test PyPi
POETRY_HTTP_BASIC_TEST_PYPI_USERNAME=__token__ POETRY_HTTP_BASIC_TEST_PYPI_PASSWORD=<token> poetry publish --repository test-pypi
- Check at https://test.pypi.org/project/dbt-mysql-adapter/
- Deploy to PyPi
POETRY_HTTP_BASIC_PYPI_USERNAME=__token__ POETRY_HTTP_BASIC_PYPI_PASSWORD=<token> poetry publish
- Confirm at https://pypi.org/project/dbt-mysql-adapter/
PyPi recognizes pre-release versioning conventions and will label "pre-releases" as-such.