-
Notifications
You must be signed in to change notification settings - Fork 32
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
GHA to create releases #170
base: master
Are you sure you want to change the base?
Conversation
Can you give some background on the savings here on starting a GH workflow vs publishing release in GH? |
9f9428a
to
4aa4088
Compare
@cretz Remove potentially some mistakes when releasing a new tag like forgetting to set as latest. Also, with this workflow, we can trigger it whenever the |
To confirm, today's approach is:
But this new approach is:
So you save a single click, but now you have two more GH workflows to maintain and the user can still mistakenly click release in api/api-go? If we're concerned about users reading release process documentation and may not properly make one of the two releases, how can we know that they will read the documentation to know not to use the GH release feature but instead manual workflow dispatch instead? Are we saving much or just adding GH workflows to maintain? |
We can further remove the ability of manually triggering the release in |
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 am a bit concerned about the maintenance of these two workflows for such an incredibly simple thing, but if y'all are resolving to maintain them and are now in full control of the release process of this and the API repo, ok.
4aa4088
to
4e20b6d
Compare
Validation added for sdk-go in another PR. Thanks Rodrigo!
.github/workflows/create-tag.yml
Outdated
CREATE_RELEASE: ${{ github.event.inputs.create_release }} | ||
BASE_TAG: ${{ github.event.inputs.base_tag }} | ||
run: | | ||
if [[ -n "$(git tag -l "$TAG")" && "$(git rev-parse "$TAG")" != "$(git rev-parse HEAD)" ]]; then |
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 think we want to be even stricter here and make sure we're not skipping versions. At that point, I'd write a Go script to do the validation though.
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.
But I wonder if there will be a case in which you want to release a patch for a previous 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.
I think patches are acceptable but I've never seen us issue them.
.github/workflows/create-tag.yml
Outdated
BASE_TAG: ${{ github.event.inputs.base_tag }} | ||
run: | | ||
gh repo set-default ${{ github.repository }} | ||
gh release create "$TAG" --verify-tag --latest --generate-notes --notes-start-tag "$BASE_TAG" |
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.
Let's create the tag here and publish a draft. I would rather have a human in the loop to verify and edit release notes.
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 wonder if making it a draft will re-introduce the human error of forgetting to publish the release.
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.
No, because there won't be a tag until the release is published AFAICT.
fetch-tags: true | ||
submodules: true | ||
|
||
- name: Validate input |
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.
We should also validate that the version given here matches the api
submodule version. I think we should verify that there is a release or maybe a draft referencing the api
submodule commit with the same version given as input to this workflow.
What changed?
GHA to create releases.
If a release is created, it also creates a PR in the consumers of api-go for review.
Why?
Automation.
How did you test it?
Potential risks