Skip to content
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

Merged
merged 3 commits into from
Jan 21, 2022
Merged

Release automation #114

merged 3 commits into from
Jan 21, 2022

Conversation

JelleZijlstra
Copy link
Collaborator

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 :)

Copy link
Collaborator

@Akuli Akuli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Comment on lines +53 to +55
- 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``.
Copy link
Collaborator

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.

Copy link
Collaborator

@srittau srittau Jan 21, 2022

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 Show resolved Hide resolved
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
Copy link
Collaborator

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.

steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
Copy link
Collaborator

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.

jobs:
build-n-publish:
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-18.04
Copy link
Collaborator

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.

.github/workflows/publish.yml Show resolved Hide resolved
Comment on lines +53 to +55
- 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``.
Copy link
Collaborator

@srittau srittau Jan 21, 2022

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.

@JelleZijlstra JelleZijlstra merged commit 095b039 into master Jan 21, 2022
@JelleZijlstra JelleZijlstra deleted the publish branch January 21, 2022 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release automation
3 participants