-
Notifications
You must be signed in to change notification settings - Fork 909
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
new(ci): autogenerate release body. #2812
Conversation
This is not needed for Falco 0.36.0, even if it would be a nice to have. |
/cc @leogr |
@@ -122,3 +122,39 @@ jobs: | |||
is_latest: ${{ needs.release-settings.outputs.is_latest == 'true' }} | |||
tag: ${{ github.event.release.tag_name }} | |||
sign: true | |||
|
|||
release-body: | |||
needs: [release-settings, publish-docker] |
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.
Only at the end of the publish!
d852828
to
01a8361
Compare
/milestone 0.37.0 |
This is now ready. See the composite action I think we might give this a shot for 0.36.0 to replace some manual tasks for the release, but given the time constraint we might skip this. (note however that even if this fails, nothing wrong happens because the new job only pushes the release body; worst case scenario is that we need to fill in the body manually, just like we used to do; best case, it will be automatically done by this. I see no risk involved with merging this. /cc @leogr @LucaGuerra |
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.
/approve
.github/workflows/release.yaml
Outdated
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body_path: ./release-body.md | ||
tag_name: ${{ github.event.release.tag_name }} |
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.
Remember that this entire workflow reacts to the creation of a new release. Wouldn't this create another one?
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 it will just update the existing one; perhaps i need to add name:
input though! Thanks for the suggestion btw
Name of the release. defaults to tag name
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 yep i totally forgot about prereleases and draft; this should only run on final releases.
I will update the workflow.
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.
Ok i should've fixed it. PTAL :)
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.
My question is more like: is https://github.com/softprops/action-gh-release able to modify an existing release? So, have you tried creating an empty repository with a pipeline which reacts to this
on:
release:
types: [published]
and check if it is able to update the release body that you added? It is possible that you did or that the manual states it somewhere but from a quick look I didn't find it
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.
So, this is the same action used by libs; on libs, you create a release (not a tag) BUT the workflow triggers on tag. Anyway, the action updates the existing github release.
Also, the action is able to append body to an existing release (this is what we do in libs actually):
append_body | Boolean | Append to existing body instead of overwriting it
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.
So, yes the action CAN update an existing github 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.
💡 When the release info keys (such as name, body, draft, prerelease, etc.) are not explicitly set and there is already an existing release for the tag, the release will retain its original info.
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.
(added correct permissions to the job btw)
|
||
release-body: | ||
needs: [release-settings, publish-docker] | ||
if: ${{ needs.release-settings.outputs.is_latest == 'true' }} # only for latest releases |
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.
@LucaGuerra this should only run for latest releases.
Signed-off-by: Federico Di Pierro <[email protected]>
…erride release name. Signed-off-by: Federico Di Pierro <[email protected]>
b8d39bb
to
688322b
Compare
Signed-off-by: Federico Di Pierro <[email protected]>
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.
Will it run for RC, too? 🤔
Only for releases |
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.
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, jasondellaluce, leogr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/milestone 0.36.0 |
This does not need to be backported on the release branch! |
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area CI
What this PR does / why we need it:
This PR autogenerates release body with:
rn2md
tool (https://github.com/leodido/rn2md)Moreover, the RELEASE.md file is updated.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Keeping this aswip
because we need leodido/rn2md#11 first (the composite action that the release workflow is now using).Does this PR introduce a user-facing change?: