Make a release
Once we’re ready to release a new version of the software, we can use the following process:
Export the new release version
export NEXT_RELEASE=1.3.0
Export the previous release version
export PREVIOUS_RELEASE=1.2.9
Pull the latest version of the
develop
branch. Usestable
if you’re releasing a bugfix.git checkout stable git pull
git checkout develop git pull
Compile the changelog
towncrier build --version $NEXT_RELEASE
Check the output and fix typos and mistakes
Add a list of contributors
python3 scripts/get-contributions-stats.py $NEXT_RELEASE # Output a list of contributors git log $PREVIOUS_RELEASE.. --format="- %aN" --reverse | sort | uniq # Get a list of all commit authors nano CHANGELOG.md # Add these lists to the CHANGELOG.md
Update the next release version
cd api poetry version "$NEXT_RELEASE" cd ..
Commit all changes
git add . git commit -m "Version bump and changelog for $NEXT_RELEASE"
Create a tag
git tag $NEXT_RELEASE
Publish the new tag to GitLab
git push --tags && git push
Merge your changes into the alternate branch
git checkout develop && git merge stable && git push
git checkout stable && git merge develop && git push
Don’t forget to create a blog post to announce the new release!