fix(ci): make publish step more robust

Summary

  • Check if version already exists in registry before publishing
  • Skip gracefully instead of failing when version is unchanged
  • Remove manual publish trigger for non-main branches (just skip entirely)

Changes

The publish job now:

  1. Extracts package name and version from package.json
  2. Checks if that version already exists in the GitLab NPM registry
  3. Only runs npm publish if the version doesn't exist
  4. Skips entirely for non-main branches (no more manual trigger)

Test Plan

  • Verify CI pipeline passes on this branch (publish step should be skipped)
  • After merge, verify main branch doesn't fail when version unchanged
  • Verify publishing still works when version is bumped

Closes #3 (closed)

🤖 Generated with Claude Code

Merge request reports

Loading