Skip to content

Conversation

@rmartins90
Copy link
Contributor

@rmartins90 rmartins90 commented Jan 19, 2025

Short description

This PR implements automated releases using Google's release-please GitHub Action. Automating version bumping, changelog management, and release creation will streamline our release process.

Before:

  • Manually update CHANGELOG.md
  • Manually bump version numbers
  • Manually create GitHub release
  • Manually write release notes

After:

  • All above steps are automated based on conventional commits
  • Release PR provides opportunity to review changes before publishing
  • Consistent changelog format and version management

Migration Note

Existing CHANGELOG.md content should be preserved. Release-please manages new entries while maintaining the historical changelog. But this needs to be validated further in the first release PR.

Changes

  • Added release-please GitHub Action workflow
  • Added release-please configuration
  • Updated publish workflow to trigger on tag creation
  • Updated PR template to remove unnecessary manual steps

How it works

  1. Developers use conventional commits (e.g., feat:, fix:, etc.)
  2. When commits are pushed to main, release-please:
    • Creates/updates a release PR with changelog and version updates
    • When the release PR is merged, creates a GitHub release and tag
  3. The new tag triggers the publish workflow to publish to npm

PR Checklist

  • Added tests for bugs / new features
  • Updated docs (storybooks, readme)

@rmartins90 rmartins90 self-assigned this Jan 19, 2025
@rmartins90 rmartins90 requested a review from henningmu January 19, 2025 22:50
@rmartins90 rmartins90 marked this pull request as ready for review January 19, 2025 22:50
Copy link
Contributor

@henningmu henningmu left a comment

Choose a reason for hiding this comment

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

Thank you for doing this, Rui 👏

Can you please add the action that enforces semantic PR titles to this PR (copy from todoist-web)?

Do you think we should mention that releases / versioning is done based on semantic commits (PR titles) in the PULL_REQUEST_TEMPLATE?

@rmartins90
Copy link
Contributor Author

Can you please add the action that enforces semantic PR titles to this PR (copy from todoist-web)?

Absolutely. Just did.

Do you think we should mention that releases / versioning is done based on semantic commits (PR titles) in the PULL_REQUEST_TEMPLATE?

Same 🙂

Can you please review again?

@rmartins90 rmartins90 requested a review from henningmu January 20, 2025 13:32
Copy link
Contributor

@henningmu henningmu left a comment

Choose a reason for hiding this comment

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

Looks great 👏

Left some minor comments, but I don't need to see this again 🙌

@rmartins90 rmartins90 merged commit 7f5f754 into main Jan 21, 2025
6 checks passed
@rmartins90 rmartins90 deleted the rui/automate-release branch January 21, 2025 12:58
@gnapse
Copy link
Contributor

gnapse commented Jan 21, 2025

image

This was referenced Jan 21, 2025
@gnapse gnapse mentioned this pull request Feb 19, 2025
9 tasks
gnapse added a commit to Doist/todoist-ai that referenced this pull request Aug 12, 2025
This is a blatant copy of Doist/reactist#863,
hence my targeted review request for Rui.

I guess I now have to configure the secrets (`GITHUB_TOKEN` and
`NPM_TOKEN`), which I'm not sure where to get from. ⚠️ **Also, please
know that this repository may eventually be public, so avoid discussing
anything sensitive here.**

Is this all it takes? Will this work out-of-the-box after that is
configured and this gets merged? Or is there something else to be done?

~~For instance, if I merge this before #5, and then I merge that PR,
will that trigger the v0.2.0 release? _(Because it's a `feat` I assume
it will increase in that way, but I'm not sure about semver on v0.x
which behaves differently; but you get my point.)_~~

I forgot that I merged #5 beforehand, so now I do not have a pull
request with which to test this. But I still need to get the changes in
#5 released. What do you think I should do? Release those changes first
manually?
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.

5 participants