Sync Package Version
ActionsAutomatically updates package.json version to match the latest GitHub release tag
v1.1.1
LatestBy richeyphu
Tags
(2)Automatically updates package.json to match the latest GitHub release tag.
✅ Syncs package.json version to match the latest GitHub release tag
✅ No manual version bumps – Just create a release, and this action updates package.json for you
✅ Works with npm, pnpm, and yarn projects
✅ Lightweight & Fast – Uses Bash & jq, no extra dependencies required
Create a new workflow file (e.g., .github/workflows/release.yml) in your repository:
name: 🚀 Release
on:
release:
types: [published]
jobs:
sync-version:
runs-on: ubuntu-latest
steps:
- name: Sync package.json version 🔄
uses: richeyphu/sync-package-version@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}- Extracts the release tag (e.g.,
v1.2.3) - Updates the
package.jsonversion field - Commits & pushes the changes
| Name | Description | Required | Default |
|---|---|---|---|
token |
GitHub token with repo permissions | ✅ Yes | N/A |
repository |
GitHub repository (e.g., owner/repo) |
❌ No | ${{ github.repository }} |
branch |
Branch to push changes to | ❌ No | main |
skip-ci |
Skip CI checks for the commit | ❌ No | false |
pull-request |
Create a pull request instead of pushing | ❌ No | false |
Licensed under the MIT License.
Sync Package Version is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.