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: implement release-please to automate release creation #863

Merged
merged 7 commits into from
Jan 21, 2025

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 🙌

.github/PULL_REQUEST_TEMPLATE.md Show resolved Hide resolved
.github/workflows/release-please.yml Show resolved Hide resolved
.github/workflows/check-semantic-pull-request.yml Outdated Show resolved Hide resolved
.github/workflows/check-semantic-pull-request.yml Outdated Show resolved Hide resolved
@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

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.

4 participants