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

feat: add release-drafter.yml #181

Merged
merged 3 commits into from Jan 12, 2024
Merged

feat: add release-drafter.yml #181

merged 3 commits into from Jan 12, 2024

Conversation

shenxianpeng
Copy link
Collaborator

Here, we used the default configuration in git cpp-linter/.github/release-drafter.yml. However, it can be overwritten if needed.

@shenxianpeng shenxianpeng added the enhancement New feature or request label Jan 12, 2024
@2bndy5
Copy link
Collaborator

2bndy5 commented Jan 12, 2024

I don't fully understand how the config works. In order to use categories, I think we need to create a few labels (for each cpp-linter repo). Then add the right label to certain PRs so release-drafter will categorize them accordingly.

Maybe I'm misunderstanding this entirely.

@2bndy5
Copy link
Collaborator

2bndy5 commented Jan 12, 2024

According to the release-drafter docs, the resolved version defaults to a patch bump. To make it bump a minor or major version, we need to add new labels named "major" and "minor".
image
Then apply the label "minor" to any PR that would imply a minor version bump (as I did for the cpp-linter/cpp-linter#51 PR). The "major" label should only be used for PRs that implement breaking changes.

@shenxianpeng
Copy link
Collaborator Author

We need to add major, minor, and patch labels for all repos for the auto-suggest version feature. we can maintain all labels here https://github.com/organizations/cpp-linter/settings/repository-defaults

@shenxianpeng
Copy link
Collaborator Author

The above link to the setting is only applies to new repo. for the existing repo we need to add related labels manually 😢

@shenxianpeng shenxianpeng marked this pull request as ready for review January 12, 2024 09:27
@shenxianpeng
Copy link
Collaborator Author

shenxianpeng commented Jan 12, 2024

I think it's ready for review. let's see how it works 😃

If this repo works as we expect, I will make the same changes to other repos later.

@shenxianpeng shenxianpeng merged commit 5091801 into main Jan 12, 2024
32 checks passed
@shenxianpeng shenxianpeng deleted the support-release-drafter branch January 12, 2024 10:21
@2bndy5
Copy link
Collaborator

2bndy5 commented Jan 12, 2024

It worked! A release for v2.7.7 was just drafted.

@shenxianpeng
Copy link
Collaborator Author

Yeah, it seems will draft for each merge. Anyway, we can decide whether we need to publish it or not.

@2bndy5
Copy link
Collaborator

2bndy5 commented Jan 12, 2024

I think this also means no more quick commits to default branches. Seems release-drafter will only work for PR merges?

@shenxianpeng
Copy link
Collaborator Author

I think this also means no more quick commits to default branches.

Yes. Right now it works for any new changes made on the main branch

https://github.com/cpp-linter/cpp-linter-action/blob/50918010d0785916fa22be78530dd2b51f60a5f4/.github/workflows/release-drafter.yml#L3-L6C15

@2bndy5
Copy link
Collaborator

2bndy5 commented Jan 12, 2024

I mean only for PRs, not for a direct commit to the main branch. right?

@shenxianpeng
Copy link
Collaborator Author

shenxianpeng commented Jan 12, 2024

Oh yes, I think so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants