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

Generate changelog for patch releases #18342

Merged
merged 12 commits into from May 27, 2024
Merged

Generate changelog for patch releases #18342

merged 12 commits into from May 27, 2024

Conversation

Zelldon
Copy link
Member

@Zelldon Zelldon commented May 7, 2024

Description

Note

That is a proposal to extend our release workflow and add the changelog generation,
at least for the patch releases.

This PR adds some more steps to the Github release job, to automate the changelog generation for patch releases, using the zcl cli tool.

Currently restricted to patch releases as it is the easiest to automate (less edge cases) and the most repetitive work to do on a release

Related issues

See related thread https://camunda.slack.com/archives/C05DH1F5TAR/p1715098083616309

Add some more steps to automate the changelog generation for patch releases,
using the zcl cli tool.

Currently restricted to patch releases as it is the easiest to automate (less edge cases)
and the most repetitive work to do on a release
@Zelldon Zelldon requested a review from a team May 7, 2024 20:32
Copy link
Member

@npepinpe npepinpe left a comment

Choose a reason for hiding this comment

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

🎉 I think the only possible improvement would be using the GH CLI to download zcl: https://cli.github.com/manual/gh_release_download

Other than that, looks good :)

.github/workflows/zeebe-release.yml Outdated Show resolved Hide resolved
.github/workflows/zeebe-release.yml Outdated Show resolved Hide resolved
.github/workflows/zeebe-release.yml Show resolved Hide resolved
Zelldon added 11 commits May 22, 2024 17:07
In order to generate the changelog we also need to have access to the tags
Instead of using wget we use built-in gh cli to download release assets
Set some bash options to print commands, etc.
To extract the patch version, we need to use the right regex without escaping the star
In order to post variable that is a multiline string we
have to use a different way to add it to the output
@Zelldon
Copy link
Member Author

Zelldon commented May 22, 2024

Hey @oleschoenburg @npepinpe would be great if someone could take a look at this again. If you are fine with it I would forward this change to the other branches :)

You can see examples of this running here https://github.com/camunda/zeebe/actions/workflows/camunda-platform-release-manual.yml?query=branch%3AZelldon-patch-1

I hope you like it :)

@Zelldon
Copy link
Member Author

Zelldon commented May 27, 2024

@oleschoenburg @npepinpe or @korthout someone has time to review it? As it would reduce the effort for patch releases :)

Copy link
Member

@korthout korthout left a comment

Choose a reason for hiding this comment

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

Thanks @Zelldon 🙌

👍 I'd be up for trying this in the upcoming patches

- uses: actions/checkout@v4
with:
ref: ${{ env.RELEASE_BRANCH }}
fetch-depth: 0 # To fetch tags as well - necessary for the changelog generation
Copy link
Member

Choose a reason for hiding this comment

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

🔧 This is a costly checkout for us (with almost 40k commits on main alone). We could try using fetchTags: true instead. Just an optimization though.

Copy link
Member

Choose a reason for hiding this comment

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

Screenshot 2024-05-27 at 16 54 07

Copy link
Member Author

Choose a reason for hiding this comment

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

Tha KS for the proposal. In general it makes sense.

But I don't think that it works as it expected with the proposed solution actions/checkout#1471

I would keep it for now like it is. I think the impact it also quite small as we don't run this workflow so often.

Feel free to improve on a later stage of course 👍

@Zelldon Zelldon added backport main Forward-port a pull request to main backport stable/8.3 Backport a pull request to 8.3.x backport stable/8.4 Backport a pull request to 8.4.x backport stable/8.5 Backport a pull request to stable/8.5 labels May 27, 2024
@Zelldon Zelldon added this pull request to the merge queue May 27, 2024
Merged via the queue into stable/8.2 with commit 7df16aa May 27, 2024
40 checks passed
@Zelldon Zelldon deleted the ck-gen-changelog-82 branch May 27, 2024 16:40
@backport-action
Copy link
Collaborator

Successfully created backport PR for main:

@backport-action
Copy link
Collaborator

Successfully created backport PR for stable/8.3:

@backport-action
Copy link
Collaborator

Successfully created backport PR for stable/8.4:

@backport-action
Copy link
Collaborator

Successfully created backport PR for stable/8.5:

github-merge-queue bot pushed a commit that referenced this pull request May 27, 2024
# Description
Backport of #18342 to `main`.

relates to
original author: @Zelldon
github-merge-queue bot pushed a commit that referenced this pull request May 27, 2024
# Description
Backport of #18342 to `stable/8.3`.

relates to
original author: @Zelldon
github-merge-queue bot pushed a commit that referenced this pull request May 27, 2024
# Description
Backport of #18342 to `stable/8.4`.

relates to
original author: @Zelldon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport main Forward-port a pull request to main backport stable/8.3 Backport a pull request to 8.3.x backport stable/8.4 Backport a pull request to 8.4.x backport stable/8.5 Backport a pull request to stable/8.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants