-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add GH Action GitHub + PyPI release automation on git version tag pushes #265
Conversation
This is great! I'm not such a fan of the body placeholder text. I wonder if it's possible to instead use the content from an annotated tag? |
I see |
have you seen this actions/create-release#11 |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
f0d784c
to
799c462
Compare
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
Cosimo, thank you. After reading the thread, I noticed I don't need to use the @chrissimpkins I've updated the PR. Could you take a look before I merge? |
@googlebot I consent. |
We can't merge this until I add the PyPi credentials. @davelab6 can I get full permissions for this repo please? I'm currently not able to add secrets to this repo. |
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} |
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.
You can probably get rid of matrix
and just use python-version: "3.x"
here?
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.
yep definitely. sorry this was copy/pasted from blocks of my ci templates. ty!
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.
@m4rc1e Please let me know if you want this change and want me to make the edit.
I tested this PR on my own branch. It produces releases which have the following appearance: It looks fine to me. It's a whole lot better than the non-existent releases we so far have. One slight complaint is the body text isn't formatted as markdown. In order to push future releases, one can do the following:
This should take care of the repo's tagged release and pushing the package to PyPi. @chrissimpkins thanks for your work on this! I may adopt this for our other tools as well since the workflow is very nice. |
@m4rc1e cool! will GH format the tag message as markdown? |
100% agree. A maintained, human distilled changelog is a feature for users who do not closely follow/develop a project IMO. The ends of the spectrum from "We're always making changes to make the best product for you" to "here are every single one of the commits that were made since we last released, parse it yourself and figure out what we did" tend to be less useful to the average user who just needs to know what happened between release X and Y. |
@anthrotype, This non-markdown issue seems to be my fault. As a test, I've removed my heuristic to dynamically fetch the release notes from the annotated tag and instead I've just hardcoded an md list. Well well, the hardcoded list works just fine. I'll look into this a bit more. |
I imagine this means that it will support automated PR / IR linking with URL/issue numbers in the text too? That would be nice |
Found it at https://github.com/m4rc1e/tools |
@m4rc1e maybe add a comment explaining why you have to escape all the newlines and the link to the original actions/create-release#11 (comment) |
Ok, we can now fetch the annotated tag's message and the output is now markdown. This nearly killed me so here are some notes:
@anthrotype I will. Apologies for all the mess in this PR. I've spent a decent amount of time getting it to work. I plan to go back and tidy. |
thanks Marc for cracking this out. I've been wanting to get a MD-formatted GH release out of a git annotated tag for long time, never got around to solve this 👍 |
Right, I'm done with this. I've added comments for the parts which need explaining. If anyone would like to review, feel free. |
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.
LGTM. Thanks for all of the edits here Marc.
I've added my PyPI credentials to this repo so we can merge this. Thanks everyone for your reviews and a shout out to Chris for starting this pr. |
My pleasure. Hope that this is helpful with your releases! |
You didn't delete Edit: oh wait this is not for testing, nevermind |
I love to see it
|
Adds a new GitHub Action configuration that prepares and pushes a GitHub release and PyPI source dist + wheel release when a
v
prefixed version git tag is pushed. It can live side-by-side with the Travis CI unit testing / type checking configuration.@m4rc1e you will need to add the following data to the repository "Secrets" settings:
PYPI_USERNAME
PYPI_PASSWORD
If those data are missing when you push a version tag, you'll get a GH release but the PyPI push will fail.
This Action automatically adds the following to the body of every release:
You'll need to change this line to something that is appropriate here.