-
Notifications
You must be signed in to change notification settings - Fork 891
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
chore: add last version changelog to the GitHub release #946
Conversation
@@ -25,6 +25,76 @@ jobs: | |||
version: v3.12.0 | |||
|
|||
- name: Run chart-releaser | |||
uses: helm/[email protected] | |||
id: chart_releaser | |||
uses: helm/[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.
Bumped to https://github.com/helm/chart-releaser-action/releases/tag/v1.6.0 to retrieve the new changed_charts
output.
- name: Checkout | ||
if: steps.chart_releaser.outputs.changed_charts != '' | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Get Last Tag | ||
id: last_tag | ||
if: steps.chart_releaser.outputs.changed_charts != '' | ||
run: echo "tag=$(git describe --abbrev=0 --tags)" >> "${GITHUB_OUTPUT}" |
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.
Unfortunately, the new chart_version
returned by helm/[email protected] is the last chart version before the publication of the current one, we need a checkout to retrieve the tag created by chart-releaser.
release_id: process.env.ID, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: process.env.BODY.slice(1, -1) + "\r\n\r\n## Changelog" + process.env.CHANGELOG, |
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've added the slice here to get rid of the double quotes around the release body.
I haven't found where they come from.
8c456cf
to
6baee18
Compare
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.
nice, next level would be something like this:
https://blog.artifacthub.io/blog/changelogs/
Implemented in #949 |
What does this PR do?
This PR add the last version changelog to the GitHub release body when a new chart version is published.
Tested on a fork, result: