You need to increment the version number according to SemVer. The rules for incrementing are as follows:
- Major: Backwards-incompatible / breaking changes, or headline new features.
- Minor: Changes that do not require DAG changes and adds new features like adding new Operators/Sensors/Hooks to the package.
- Patch: Anything else, mainly bug-fixes and security fixes.
Minor and Patch versions should not contain any breaking changes.
This includes the following steps which are detailed below.
- Create a new release branch from main
- Update the version number
- Write the changelog
Or you can use make target prepare-release
(make sure you're on the main
branch and have the latest tag on your local machine)
make ASTRO_PROVIDER_VERSION=<RELEASE_VERSION> prepare-release
It creates the release branch, checkout to it, bump the version number, extract all the commit messages between the previous release to the latest commit and write them in to CHANGELOG.rst. The only thing you need to do is updating CHANGELOG.rst manually.
Create a new release branch from main
branch with the name release-<version>
.
e.g. If you want to release version 1.17.6
, you can create a new branch called release-1-17-6
cut from main
branch.
Note: It is important to prefix your release branch name with release-
. This is because we run a CircleCI job to generate
the constraints files only on such branches and the main
branch.
You will need to update it in:
setup.cfg
- inversion
key of[metadata]
sectiondocs/conf.py
-release
variableastronomer/providers/package.py
-get_provider_info
method return valueversions
You can also use commitizen (version >= 3.4.0 is required) to update the version in these files
Install commitizen on mac
brew install commitizen
Bump versions locally
make ASTRO_PROVIDER_VERSION=<RELEASE_VERSION> bump-version
Note: <RELEASE_VERSION>
is the software version you want to release.
You can use the following link to compare the commits introduced since the last release (e.g. 1.15.4)
https://github.com/astronomer/astronomer-providers/compare/1.15.4...main
Note: Make sure to replace the last release version in the above URL
Add the new release to CHANGELOG.rst
, along with as many release notes
as you can (more information is always better than less, though try to group
it with larger changes at the top).
Bundle up these changes into a single commit with the message in the format "Release 1.2.1". Submit a pull request for this commit and wait for approval unless you are releasing an urgent security fix.
Once the release branch has been approved and merged to main
, checkout to the main
branch.
It will trigger the GitHub Actions to tag that commit with a tag that matches the version number (git tag 1.2.1 <latest commit sha>
),
and then push the tag (git push origin 1.2.1
).
CircleCI will handle the rest - building, testing, and pushing the resulting artifacts to PyPI. Keep an eye out for test failures, though.
Create a new release on GitHub by clicking on this link. Choose the tag you just created, and fill in the release notes or click on Auto-generate release notes.
Use 1.1.0 release notes as an example.
Verify that new docs are published on ReadTheDocs site.
The stable
version of the docs should be the same as the version number of the release.
You can verify this checking the changelog entries.
Close the milestone on GitHub for that particular version. Example: https://github.com/astronomer/astronomer-providers/milestone/2
Make an announcement to the releases channel on Astronomer Slack by referring to the template from one of the previous releases.:
If you are releasing a new major release, then you should make a new branch
called x-0-stable
for the previous release from the last commit on
main
for that release.
Create a PR to bump the astronomer-providers
version to the next minor dev version.e.g. If you just released 1.15.6
, then
the next version should be 1.16.0-dev1
. This PR should be merged to main
branch.