Skip to content

Automate version bumping in NPM publish workflow#102

Merged
bartveneman merged 1 commit intomainfrom
claude/implement-css-parser-improvements-o8lwb
Mar 18, 2026
Merged

Automate version bumping in NPM publish workflow#102
bartveneman merged 1 commit intomainfrom
claude/implement-css-parser-improvements-o8lwb

Conversation

@bartveneman
Copy link
Member

Summary

Updated the NPM publish GitHub Actions workflow to automatically bump the package version during the release process, ensuring the published package version matches the git release tag.

Key Changes

  • Updated contents permission from read to write to allow pushing commits
  • Added automated version bumping step that extracts the version from the release tag and updates package.json
  • Added commit and push step to persist the version bump back to the main branch with proper git configuration for the bot user
  • Removed outdated workflow comments

Implementation Details

  • The version bump uses npm version with the --no-git-tag-version flag to avoid creating duplicate git tags
  • Git configuration is set to use the github-actions[bot] user for the automated commit
  • Both package.json and package-lock.json are committed to maintain lockfile consistency
  • The version string is normalized by stripping the leading 'v' from the tag name (e.g., v1.0.01.0.0)

https://claude.ai/code/session_019neB1M5BGWawFNHeFZsyPZ

Extract version from release tag and update package.json before
publishing to NPM, then commit and push the version bump back to main.
@bartveneman bartveneman merged commit 9016933 into main Mar 18, 2026
6 of 7 checks passed
@bartveneman bartveneman deleted the claude/implement-css-parser-improvements-o8lwb branch March 18, 2026 13:21
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.71%. Comparing base (b67d355) to head (b407ac2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #102   +/-   ##
=======================================
  Coverage   96.71%   96.71%           
=======================================
  Files          14       14           
  Lines        1064     1064           
  Branches      142      142           
=======================================
  Hits         1029     1029           
  Misses         34       34           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codecov-commenter
Copy link

Bundle Report

Bundle size has no change ✅

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