Skip to content

feat(release): scope package to @kamansoft org and fix CI/CD pipeline#8

Merged
lemyskaman merged 4 commits into
mainfrom
feat/publish-to-npm
Jun 19, 2026
Merged

feat(release): scope package to @kamansoft org and fix CI/CD pipeline#8
lemyskaman merged 4 commits into
mainfrom
feat/publish-to-npm

Conversation

@lemyskaman

Copy link
Copy Markdown
Member

Summary

This PR fixes the release automation end-to-end and publishes the package for the first time.

Changes

Package rename

  • Renamed from vite-plugin-flatwave-react@kamansoft/vite-plugin-flatwave-react (npm org scope)
  • Updated all internal references: e2e test workspace name, example package.json dependency key, example vite.config.ts import
  • First publish already done: @kamansoft/vite-plugin-flatwave-react@0.1.0 is live on npmjs.com

release.yml — root-cause fixes

Problem Fix
NPM_TOKEN was in GitHub secrets but never passed to semantic-release Added NPM_TOKEN: ${{ secrets.NPM_TOKEN }} to the Release step env
registry-url in setup-node created an .npmrc that conflicted with @semantic-release/npm's own auth, causing EINVALIDNPMTOKEN errors Removed registry-url from setup-node
Release ran in parallel with CI (could publish broken code) Added ci job as a prerequisite; release job only runs after CI passes
Concurrent pushes to main could trigger simultaneous releases Added concurrency group
npm 10.x (Node 22 default) too old for OIDC trusted publishing Added npm install -g npm@latest step

ci.yml

  • Removed push: branches: [main] trigger — release.yml runs its own CI gate, so CI was running twice on every merge

What happens after this merges

  1. The Release workflow runs on push: branches: [main]
  2. CI Validation job runs first (full build + test suite)
  3. If CI passes, Release & Publish to npm job runs npx semantic-release
  4. semantic-release analyses commits, bumps version, publishes @kamansoft/vite-plugin-flatwave-react to npmjs, creates a GitHub Release

Optional upgrade (after merge): npm OIDC trusted publishing

Once the trusted publisher is configured on npmjs.com, NPM_TOKEN can be removed from the workflow — OIDC handles auth automatically. See docs/ci-cd-release-automation.md (added in a follow-up) for instructions.

- Rename package to @kamansoft/vite-plugin-flatwave-react (npm org scope)
- Update all internal references: e2e tests, example workspace, vite.config
- Fix release.yml: add CI prerequisite job, concurrency guard, npm upgrade
  to latest (required for OIDC), remove conflicting registry-url from
  setup-node, wire NPM_TOKEN to @semantic-release/npm
- Fix ci.yml: remove redundant push-to-main trigger (release.yml re-runs
  CI internally before releasing)
- Package @kamansoft/vite-plugin-flatwave-react@0.1.0 published to npm
@lemyskaman lemyskaman merged commit 830f9ca into main Jun 19, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant