john-kurkowski / tldextract

Accurately separates a URL’s subdomain, domain, and public suffix, using the Public Suffix List (PSL).
BSD 3-Clause "New" or "Revised" License
1.81k stars 211 forks source link

Automate release process #325

Closed ekcorso closed 3 months ago

ekcorso commented 3 months ago

This automates the process for releasing a new version of tldextract. It prompts the user to add a tag, creates a build, prompts for verification, uploads the build to PyPi, pushes the new tag to Github, and then creates a draft of the Github release.

Note that the release notes will be based based on a combination of the CHANGELOG.md entry that matches the version tag and GitHub's generated changelog URL.

The user will need a Github app auth token and Pypi credentials in order to run this.

Changes

john-kurkowski commented 3 months ago

For PyPI releases of this project, I told @ekcorso I was trying to remember and manually execute several steps. We collaborated on this script offline. Now my manual steps are codified in this repo! Hopefully less error prone for me, and the steps could be followed by any maintainer. I'm excited to put this to use. Thank you!

john-kurkowski commented 3 months ago

I used the script to release 5.1.2. Script worked like a charm! 🙌

Only a couple minor follow-ups:

  1. I fat-fingered something later in the process and couldn't re-run the script as is, I had to manually delete a tag, outside the script. Automated tag rollback in befc91c9c3a15dff464d2b7f4b1f3b4c31d18107.
  2. I had to manually restore the release's "New Contributors" section automatically generated by GitHub. This script was stripping too much from the automatic release notes. Fixed in #327.