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:
- Extracts package name and version from
package.json - Checks if that version already exists in the GitLab NPM registry
- Only runs
npm publishif the version doesn't exist - 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)