-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release automation #114
Release automation #114
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
- Draft a release using the GitHub UI. The tag name should be | ||
identical to the version (e.g., ``22.1.0``) and the release notes | ||
should be copied from ``CHANGELOG.rst``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have automated this in one of my projects with a mess of awk
to extract the relevant part of changelog, and actions/create-release
to make the release: https://github.com/Akuli/porcupine/blob/1ad0d5fa8d944ef66a0dbb7e0100da3a13aebfda/.github/workflows/build.yml To trigger it, I use a script that sanity checks the CHANGELOG, changes the version numbers and creates a tag.
That said, we can automate more of this later, and for now I think we just want something that works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should at least do a sanity check in the script to see whether the versions in the changelog, the setup file and the tag match, although we can do that in a later version as well after the next release.
.github/workflows/publish.yml
Outdated
name: Build and publish Python distributions to PyPI | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd pin this to v2. While new versions are unlikely to break this simple checkout, I wouldn't use an unreleased version of the action.
.github/workflows/publish.yml
Outdated
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v2 is the current version. Shouldn't make a difference here, but I assume that v2 is still actively developed and fixed.
.github/workflows/publish.yml
Outdated
jobs: | ||
build-n-publish: | ||
name: Build and publish Python distributions to PyPI | ||
runs-on: ubuntu-18.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ubuntu-20.04
is current.
- Draft a release using the GitHub UI. The tag name should be | ||
identical to the version (e.g., ``22.1.0``) and the release notes | ||
should be copied from ``CHANGELOG.rst``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should at least do a sanity check in the script to see whether the versions in the changelog, the setup file and the tag match, although we can do that in a later version as well after the next release.
Fixes #95.
Basically taken from https://github.com/JelleZijlstra/typeshed_client, where it's been working well for me. I already put the required API token in the settings. I hope it actually works :)