joshjohanning/npm-version-check-action
GitHub Action that validates npm package version increments in pull requests to ensure proper semantic versioning
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| package-path | Path to package.json file (relative to repository root) | no | package.json |
| tag-prefix | Prefix for version tags (e.g., "v" for v1.0.0) | no | v |
| skip-files-check | Always run version check regardless of which files changed. Default (false) only checks if project source files changed, skipping when only tests/docs/configs are modified | no | false |
| include-dev-dependencies | Whether devDependency changes should trigger version bump requirement. Default (false) ignores devDependencies changes and skips package-lock.json analysis when only devDeps change, preventing false positives from dev dependency lock file updates | no | false |
| skip-version-keyword | Keyword in commit messages to skip version check for that commit. Files changed in commits containing this keyword are excluded from the version check. Set to empty string to disable. | no | [skip version] |
| skip-version-consistency-check | Skip the check that validates package.json and package-lock.json have matching versions. Useful if you intentionally have different versions or do not use package-lock.json. | no | false |
| skip-major-on-actions-runtime-change | Skip the check that requires a major version bump when action.yml changes its Node.js Actions runtime version (runs.using). Default (false) enforces major bumps for runtime changes since they are breaking changes for action consumers. | no | false |
| skip-sequential-version-check | Skip the check that validates version increments are sequential (e.g., 4.0.0 to 4.1.0 not 4.2.0). Default (false) enforces sequential increments. | no | false |
| token | GitHub token for API access (required). Used for fetching PR diff, repository tags, and commit analysis. | yes | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| version-changed | Whether the version was changed |
| current-version | Current version from package.json |
| previous-version | Previous version from latest git tag |
| runtime-changed | Whether the Node.js Actions runtime version in action.yml was changed |
| version-increment-type | The type of version increment detected: major, minor, or patch (empty when no numeric bump type is detected, e.g., first release or prerelease-only changes) |