Skip to content

chore!: migrate from release-please to semantic-release#104

Open
frankieyan wants to merge 11 commits intomainfrom
frankie/semantic-release
Open

chore!: migrate from release-please to semantic-release#104
frankieyan wants to merge 11 commits intomainfrom
frankie/semantic-release

Conversation

@frankieyan
Copy link
Copy Markdown
Member

@frankieyan frankieyan commented Apr 1, 2026

Overview

We're standardizing on semantic-release across our non-product repositories (ref). release-please required merging a separate release PR before publishing, adding latency and a manual step. semantic-release collapses this into a single pipeline: push to main triggers CI validation, version analysis, changelog update, npm + GitHub Packages publish, and a GitHub release.

The setup follows Doist/typist as closely as possible, with three intentional differences: main only (no next prerelease branch), no CHANGELOG formatting step (Biome doesn't format Markdown), and doist-release-bot App tokens instead of a PAT, adopted from todoist-sdk-typescript #529/#530.

Breaking change

This PR drops Node 20 support, narrowing engines.node from ^20.0.0 || >=22.0.0 to ^22.14.0 || >=24.10.0. semantic-release@25 requires Node 22.14+, and with engine-strict=true in .npmrc, keeping Node 20 in the engine range would cause npm install to fail for contributors on Node 20. This aligns with typist, which made the same change.

Reference

Pre-merge checklist

  • doist-release-bot installed and added as bypass actor on both rulesets
  • Bridge git tag created (v2.3.3 pointing to react-compiler-tracker-v2.3.3)
  • npm trusted publisher config updated to reference publish-package-release.yml

Test plan

  • After merge, verify the Package Release workflow runs on the merge commit
    • Exits cleanly with "no release" (merge commit is chore: type)
  • Merge a feat: or fix: commit to main
    • CHANGELOG.md updated, package.json version bumped
    • npm package published with provenance
    • GitHub release created
    • GitHub Packages publish succeeds
  • Old "Release Please" and "Publish" workflows no longer appear in Actions tab

@frankieyan frankieyan marked this pull request as ready for review April 1, 2026 05:43
@frankieyan frankieyan requested a review from a team as a code owner April 1, 2026 05:43
@frankieyan frankieyan requested review from pauloslund and removed request for a team April 1, 2026 05:43
Copy link
Copy Markdown
Member

@doistbot doistbot left a comment

Choose a reason for hiding this comment

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

This PR transitions the release pipeline from release-please to semantic-release to streamline package publishing into a single, automated workflow. The implementation aligns well with other Doist repositories and will nicely reduce manual release steps. However, a few adjustments are needed before merging, specifically regarding restoring the npm version floor for provenance support, preventing potential secret exposure by reverting elevated fork PR workflow triggers, and resolving a Node engine compatibility conflict with the chosen semantic-release version.

Share FeedbackReview Logs


on:
pull_request:
pull_request_target:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] Avoid elevating this check to pull_request_target. That trigger runs on fork PRs with the base repository token, which goes against our public-repo secrets guidance for fork-triggered workflows because a later workflow change or third-party action issue can exfiltrate it: https://handbook.doist.com/doc/standard-secrets-management-. The previous pull_request trigger already had enough access to read PR titles, so this change grants more privilege than the job needs.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This workflow doesn't execute the fork PR's code. The only thing it is allowed to do is verify the PR title with amannn/action-semantic-pull-request. We also do this in our other public repos.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Rolled this back because it prevented the validate title job from being run for this PR. Even though it should work for subsequent PRs, the change wasn't worth temporarily stopping it from running here.

@frankieyan frankieyan changed the title chore: migrate from release-please to semantic-release chore!: migrate from release-please to semantic-release Apr 1, 2026
semantic-release@25 requires Node ^22.14.0 || >=24.10.0, which
conflicts with engine-strict=true when the engines field includes
Node 20. Align with typist's approach by narrowing the range.

BREAKING CHANGE: Minimum Node.js version is now 22.14.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
frankieyan and others added 2 commits April 1, 2026 02:15
The @semantic-release/npm plugin handles provenance for the npm registry
publish via the id-token: write permission. Having provenance: true in
publishConfig causes the GitHub Packages npm publish step to fail since
GitHub Packages doesn't support npm provenance.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pull_request_target is unnecessary here since the action only reads PR
metadata and never checks out fork code. Reverting also fixes the CI
check not running on this PR due to a trigger mismatch between branches.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

3 participants