Skip to content

Release Procedure

Joris Roovers edited this page May 15, 2023 · 18 revisions

Pre-release work

  • Check that you've included the latest CLI output in the documentation homepage
  • Update the CHANGELOG.md
  • Consider releasing a release candidate first (e.g. 0.19.0.rc1)

Release

Set env var, used below

export GITLINT_VERSION="v0.19.0rc1"

Commit and push release commit to github

Template commit message:

0.1.0 release

[copy release notes here]

Full Release details in CHANGELOG.md.

WAIT FOR CI TO FINISH TESTING

Tag git commit

git tag $GITLINT_VERSION
git tag --list
git push --tags

Create a new release on github

Go to the releases page and create a new release. Copy in changes from the raw CHANGELOG.md

Publishing a github release will automatically trigger the gitlint release automation: https://github.com/jorisroovers/gitlint/actions/workflows/github-release.yml

Note that making an edit to a published release will NOT retrigger the release automation (so it's safe to edit typos the release notes).

WAIT FOR THE RELEASE AUTOMATION TO FINISH

Push new docs

hatch run docs:mike deploy --push --update-aliases $GITLINT_VERSION latest

# In case of issues, remember that `mike deploy` only creates new commits on `gh-pages` branch. 
# You can always manually switch to the `gh-pages` branch and manually push and or/fix.
# You can delete versions like so
# hatch run docs:mike delete <version or alias>

Manual sanity checks

PyPI

virtualenv "/tmp/gitlint-release-$GITLINT_VERSION" &&  source "/tmp/gitlint-release-$GITLINT_VERSION/bin/activate"
pip install gitlint
gitlint --version
gitlint --debug

Docker

Note: for 0.19.0, the docker images were only automatically pushed to latest_dev, had to manually run the docker publish workflow for latest and 0.19.0

# Remove local copies
docker image rm -f jorisroovers/gitlint:$GITLINT_VERSION
docker image rm -f jorisroovers/gitlint:latest
docker image rm -f jorisroovers/gitlint


# Pull image from dockerhub and test again
docker run -v $(pwd):/repo jorisroovers/gitlint:$GITLINT_VERSION --version
docker run -v $(pwd):/repo jorisroovers/gitlint:$GITLINT_VERSION --debug
docker run -v $(pwd):/repo jorisroovers/gitlint:latest --version
docker run -v $(pwd):/repo jorisroovers/gitlint:latest --debug
docker run -v $(pwd):/repo jorisroovers/gitlint --version
docker run -v $(pwd):/repo jorisroovers/gitlint --debug

Post Release Steps

Bump version to dev

# Update CHANGELOG.md to include new version number

# The commit the changelog and tag the commit
export NEW_VERSION="0.9.0dev"
echo -e "Version bump to $NEW_VERSION\n\nBumped version to $NEW_VERSION." > /tmp/gitlint-$NEW_VERSION-version-bump-commitmsg
git commit -F /tmp/gitlint-$NEW_VERSION-version-bump-commitmsg
git tag $NEW_VERSION
git tag --list
git show # Tag should show up
git push

Make sure to shutdown any AWS Windows testing VMs

Ask harens in associated Release Plan issue to push builds for homebrew and macports

Close the release github milestone and Release Plan issue

Create Release Plan issue and milestone for next release on github

Announce new release (social media, etc)