Skip to content

feat(ci): automate npm releases with semantic-release#18

Merged
ajitgunturi merged 1 commit into
mainfrom
ci/automated-semantic-release
Mar 20, 2026
Merged

feat(ci): automate npm releases with semantic-release#18
ajitgunturi merged 1 commit into
mainfrom
ci/automated-semantic-release

Conversation

@ajitgunturi
Copy link
Copy Markdown
Collaborator

Summary

  • Replace manual version management with semantic-release — version bumps are now derived from conventional commit messages automatically on merge to main
  • Pipeline: commit analysis → CHANGELOG.md → npm publish (with provenance) → GitHub Release → version commit back to main
  • Update CONTRIBUTING.md with commit message conventions and versioning workflow
  • Update docs/releasing.md with full release documentation

How versioning works after this PR

Commit type Version bump Example
fix: Patch (1.1.25) fix: handle empty plugin list
feat: Minor (1.2.0) feat: add Gemini adapter
feat!: / BREAKING CHANGE: Major (2.0.0) feat!: drop Node 18 support
chore:, docs:, ci: No release docs: update README

Test plan

  • Verify CI passes on this PR
  • After merge, confirm the Release workflow runs and semantic-release analyzes commits
  • Ensure NPM_TOKEN secret is set in repo settings before merge

🤖 Generated with Claude Code

Replace manual version management with semantic-release which reads
conventional commit messages to determine version bumps automatically.
Includes CHANGELOG generation, GitHub Releases, and npm provenance.

Update CONTRIBUTING.md and docs/releasing.md with the new versioning
workflow and commit message conventions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ajitgunturi ajitgunturi merged commit 1af6232 into main Mar 20, 2026
2 checks passed
@ajitgunturi ajitgunturi deleted the ci/automated-semantic-release branch March 20, 2026 13:33
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 80bf0c6ec6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -40,19 +42,10 @@ jobs:
registry-url: https://registry.npmjs.org
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove registry-url from the semantic-release setup step

This setup-node configuration is likely to break releases. The semantic-release GitHub Actions recipe explicitly warns not to set registry-url when publishing with @semantic-release/npm, because the generated .npmrc can cause EINVALIDNPMTOKEN even when the token is valid. In this release job, any merge that should publish can fail during npm verification/publish purely because of that extra auth file.

Useful? React with 👍 / 👎.

- name: Semantic Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Stop relying on the default GITHUB_TOKEN for release pushes

If this repo keeps the protected-main ruleset defined in scripts/setup-branch-protection.sh:29-58, this workflow cannot complete a release. .releaserc.json:23-25 enables @semantic-release/git, so semantic-release must push a version/changelog commit and tag back to main, but the GitHub Actions recipe notes that the automatically populated GITHUB_TOKEN cannot be used when branch protection is enabled. In that setup, the first releasable merge will fail as soon as semantic-release tries to write back the release commit.

Useful? React with 👍 / 👎.

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.

1 participant