Skip to content

chore: migrate from release-please to semantic-release#78

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

chore: migrate from release-please to semantic-release#78
frankieyan wants to merge 9 commits intomainfrom
frankie/semantic-release

Conversation

@frankieyan
Copy link
Copy Markdown
Member

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.

Reference

Pre-merge checklist

  • doist-release-bot installed and added as bypass actor on both rulesets
  • DOIST_RELEASE_BOT_ID and DOIST_RELEASE_BOT_PRIVATE_KEY secrets configured
  • Bridge git tag created (v1.1.0 pointing to interaction-trace-v1.1.0)
  • 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 and others added 7 commits March 31, 2026 21:35
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@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 pedroalves0 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 pull request smoothly transitions the repository's release pipeline from release-please to semantic-release, streamlining the process into a single automated workflow upon merging to the main branch. The new approach significantly reduces manual steps and standardizes our release automation with other non-product repositories. A few adjustments are noted for the release workflow configuration, particularly regarding npm provenance compatibility with GitHub Packages, ensuring the necessary npm version is available for OIDC publishing, refining timing for the publish success flag, and tightening workflow permissions to align with the principle of least privilege.

Share FeedbackReview Logs

# Enable the use of GitHub Packages registry
packages: write
# Enable semantic-release to publish a GitHub release and push commits
contents: write
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] Overly broad workflow permissions (Least Privilege)

The workflow-level GITHUB_TOKEN does not need contents: write, issues: write, or pull-requests: write because the semantic-release step explicitly authenticates via the App Token (GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}) to bypass branch protection rules.

Granting these write permissions to the built-in token violates the principle of least privilege. The workflow token only needs id-token: write (for npm OIDC), packages: write (for GitHub Packages publish), and contents: read (default/checkout). You can safely remove lines 13-18 and replace them with:

    contents: read

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 follows the pattern set out by other repos (Typist, etc.), but we can bring this up in the thread.

frankieyan and others added 2 commits April 1, 2026 02:15
…ility

GitHub Packages doesn't support npm provenance, so having
`provenance: true` in publishConfig would break the GitHub Packages
publish step. Provenance for the npm registry is handled implicitly
by @semantic-release/npm when the id-token: write permission is
present, matching how typist handles this.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
pull_request_target uses the workflow from the base branch, so the
updated version never actually runs during the PR. The action only
reads the PR title, so pull_request provides sufficient access.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@pedroalves0 pedroalves0 left a comment

Choose a reason for hiding this comment

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

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