Skip to content

Automate version bumping in release workflow#169

Merged
bartveneman merged 1 commit intomainfrom
claude/implement-pr-190-SVpqO
Mar 18, 2026
Merged

Automate version bumping in release workflow#169
bartveneman merged 1 commit intomainfrom
claude/implement-pr-190-SVpqO

Conversation

@bartveneman
Copy link
Member

Summary

This PR updates the release workflow to automatically bump the package version during the release process, ensuring that version numbers in package.json and package-lock.json stay in sync with git tags.

Key Changes

  • Permission update: Changed contents permission from read to write to allow the workflow to commit and push changes
  • Version bumping: Added a step to extract the version from the git tag (removing the v prefix) and update it in package.json
  • Git commit: Added a step to configure git user credentials and commit the version bump changes back to the main branch with a descriptive commit message

Implementation Details

  • The version is extracted from GITHUB_REF_NAME environment variable using bash parameter expansion (${GITHUB_REF_NAME#v})
  • Git configuration uses the GitHub Actions bot identity for commits
  • Both package.json and package-lock.json are committed to maintain lockfile consistency
  • The version bump occurs after tests pass but before the build and publish steps

https://claude.ai/code/session_01MwzSa6WMkR5d7xy1nptdHZ

Automatically update package.json and package-lock.json version
whenever a GitHub release is created, using the release tag name.
Uses npm version --no-git-tag-version to avoid duplicate tags.

Implements projectwallace/css-parser#190
@bartveneman bartveneman merged commit 9be1afb into main Mar 18, 2026
4 of 5 checks passed
@bartveneman bartveneman deleted the claude/implement-pr-190-SVpqO branch March 18, 2026 13:24
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #169   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          320       320           
  Branches       112       112           
=========================================
  Hits           320       320           

☔ 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
Copy link

codecov bot commented Mar 18, 2026

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.

2 participants