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

ci: Integrate Release-please action and config #67

Merged
merged 11 commits into from
Dec 17, 2024

Conversation

JesperDramsch
Copy link
Member

@JesperDramsch JesperDramsch commented Dec 13, 2024

This is a proposal to manage our release process and changelog updates using release-please). This was originally proposed by @dnerini.

From the docs:

Release Please automates CHANGELOG generation, the creation of GitHub releases, and version bumps for your projects.

It does so by parsing your git history, looking for Conventional Commit messages, and creating release PRs.

It does not handle publication to package managers or handle complex branch management.

Analysis of Alternatives

I have evaluated alternatives such as Python Semantic Releases and a few others, but release-please seems like the most mature project that would work across all packages, including mono-repos and helps with the changelog as well.

It is to be said, that the documentation of release-please is not very beginner-friendly, so it will probably take a few tries to set up correctly until we have a working setup usable across all of Anemoi.

For reference, there is a archived repo showing the setup for mono-repos if that is necessary

How to run

They have implemented a corresponding Action.

Additional Information

I have mainly used the Manifest Releaser document to set up the configs and action.
Additionally, I looked at the JSON schema to evaluate if there are additional relevant config entries.

Caveat

All automated log generators require some sort of commit convention.

Since we squash-merge anyways, we can limit the effect on new contributors by only requiring PRs to follow Conventional Commits. This seems like an acceptable half-way solution that doesn't get in the way of quick development, but introduces some structure in the code itself.

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.86%. Comparing base (2837ecd) to head (8b6f103).
Report is 10 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop      #67   +/-   ##
========================================
  Coverage    71.86%   71.86%           
========================================
  Files            7        7           
  Lines          263      263           
========================================
  Hits           189      189           
  Misses          74       74           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JesperDramsch JesperDramsch changed the title feat: Integrate Release-please action and config ci: Integrate Release-please action and config Dec 13, 2024
@dnerini
Copy link

dnerini commented Dec 13, 2024

@OpheliaMiralles @icedoom888 @frazane please take this opportunity to have a closer look at release-please and feel free to leave your feedback. The idea would be to roll out this to all anemoi repos.

@dnerini
Copy link

dnerini commented Dec 13, 2024

@JesperDramsch squash commits seems to be right way to go with release-please (see here). This would limit the need to follow conventional commit messages to PR titles only.

Copy link
Collaborator

@b8raoult b8raoult left a comment

Choose a reason for hiding this comment

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

Double // comments are not valid in JSON. I guess the . release-please-config.json file is merely a template.

@JesperDramsch
Copy link
Member Author

Double // comments are not valid in JSON. I guess the . release-please-config.json file is merely a template.

Oh. Thanks for catching this!

@JesperDramsch
Copy link
Member Author

@JesperDramsch squash commits seems to be right way to go with release-please (see here). This would limit the need to follow conventional commit messages to PR titles only.

Ah fantastic @dnerini. I'm glad this resonates, I hope the action I added to check these will help with this.

@frazane
Copy link

frazane commented Dec 16, 2024

Seems like a great idea, thank you! Question: now that we're in major version zero (early development) will breaking changes by default result in a minor version bump?

@JesperDramsch
Copy link
Member Author

Seems like a great idea, thank you! Question: now that we're in major version zero (early development) will breaking changes by default result in a minor version bump?

Yes exactly. So currently I have configured it so that breaking changes bump minor and features bump patch.

@JesperDramsch JesperDramsch merged commit 01eb9fe into develop Dec 17, 2024
54 checks passed
@JesperDramsch JesperDramsch deleted the feat/release-please branch December 17, 2024 13:35
@HCookie HCookie mentioned this pull request Dec 17, 2024
JesperDramsch added a commit that referenced this pull request Dec 17, 2024
* First iteration of release-please action and config

* fix: add schema to release please config

* Remove old changelog actions

* ci: add PR title linter

* ci: trigger release please on develop only

* ci: workflow to merge main into develop automatically

* fix: double key in ci merge main

* ci: move name up for release please

* docs: add an initial ruleset for better Github release notes

* remove comments and fix schema

* add comment

Update secret in release-please.yml

Create release please on develop for now

Update .release-please-manifest.json

Experiment Github Token release-please.yml

fix: bump version, token, filtering

revert: Github token

fix: remove component from tag

ci: reinstate token

ci: more release-please config options

ci: better text

ci: fix release please spaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants