* Next Dev Version: `1.3dev`
* Source Branch: `main`
Release Workflow
The release on Github and PyPi performed from a release branch while the release branch PR is in progress. After the releases, the version in the PR is updated before it is merged. Thus, the version in `main` is not the same as the version of the release.
*NOTE: This section refers to version and branch names given in Release Naming Conventions section above.*
1. Starting from the Source Branch, create a release branch named `release-{Release Version}`
1. Make the following changes for the release:
* Update `CHANGES.txt`, adhering to [Keep a Changelog](https://keepachangelog.com/)
* Include added, changed, deprecated or removed features and bug fixes.
A list of merged PRs and their titles since the last release can be obtained with `git log $PREVIOUS_RELEASE_TAG..HEAD | awk '/Merge pull request/{print;getline;getline;print}'`.
* Sort according to importance
* Update `planet/__version__.py` to Release Version
1. Create a PR for the release branch (named after release branch, description is changelog entry, base is Source Branch), wait for CI to pass
1. Create a new github release:
* Set Tag to Release Version
* **!!!** Set Target to the release branch **!!!**
* Set Title to Tag Release Version
* Copy Description from the new entry in the changelog
* Select "This is a pre-release" if applicable
1. Verify the successful run of the Github Action "Autopublish to TestPyPi" and validate the test release on [test.pypi.org](https://test.pypi.org/project/planet/)
1. Run the Github Action "Publish on PyPi", **!!!** Set Branch to the release branch **!!!**
1. Verify the successful run of the Github Action "Publish on PyPi" and validate the release on [pypi.org](https://pypi.org/project/planet/)
1. Push a commit to the PR updating `planet/__version__.py` to Next Dev Version
1. Merge PR
1. Announce the release through the following avenues:
* *Planet Internal:* python and devrel slack channels
* Changelog
1. Maintenance release only: Merge release tag into `main`
Local publishing
Publishing to testpypi and pypi can also be performed locally with:
console
$ nox -s build publish-testpypi
then
console
$ nox -s publish-pypi
This approach requires specifying the pypi/testpypi api token as the password at the prompt.
Conda builds
When stable, not pre-release, files are uploaded to PyPI, a bot will detect them and make an automated PR to https://github.com/conda-forge/planet-feedstock/pulls. When a Conda-forge maintainer merges that PR, a package will be built for the new version and will be published to https://anaconda.org/conda-forge/planet/files.