chore!: migrate from release-please to semantic-release#104
chore!: migrate from release-please to semantic-release#104frankieyan wants to merge 11 commits intomainfrom
Conversation
doistbot
left a comment
There was a problem hiding this comment.
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.
|
|
||
| on: | ||
| pull_request: | ||
| pull_request_target: |
There was a problem hiding this comment.
[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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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>
b88b69b to
30cdfe6
Compare
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>
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
maintriggers 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:
mainonly (nonextprerelease branch), no CHANGELOG formatting step (Biome doesn't format Markdown), anddoist-release-botApp tokens instead of a PAT, adopted from todoist-sdk-typescript #529/#530.Breaking change
This PR drops Node 20 support, narrowing
engines.nodefrom^20.0.0 || >=22.0.0to^22.14.0 || >=24.10.0. semantic-release@25 requires Node 22.14+, and withengine-strict=truein.npmrc, keeping Node 20 in the engine range would causenpm installto fail for contributors on Node 20. This aligns with typist, which made the same change.Reference
Pre-merge checklist
doist-release-botinstalled and added as bypass actor on both rulesetsv2.3.3pointing toreact-compiler-tracker-v2.3.3)publish-package-release.ymlTest plan
Package Releaseworkflow runs on the merge commitchore:type)feat:orfix:commit tomain