{"id":18690069,"url":"https://github.com/yakovlev-alexey/bump-package-version-action","last_synced_at":"2026-04-16T19:05:43.124Z","repository":{"id":45202434,"uuid":"441764553","full_name":"yakovlev-alexey/bump-package-version-action","owner":"yakovlev-alexey","description":"A simple GitHub Action to automatically bump npm versions","archived":false,"fork":false,"pushed_at":"2021-12-31T23:08:42.000Z","size":974,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-28T02:27:00.588Z","etag":null,"topics":["action","bumpversion","conventional-commits","github","github-actions","npm","package","semantic-versioning"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yakovlev-alexey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-25T21:54:22.000Z","updated_at":"2021-12-31T23:08:45.000Z","dependencies_parsed_at":"2022-07-25T22:32:56.915Z","dependency_job_id":null,"html_url":"https://github.com/yakovlev-alexey/bump-package-version-action","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakovlev-alexey%2Fbump-package-version-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakovlev-alexey%2Fbump-package-version-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakovlev-alexey%2Fbump-package-version-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yakovlev-alexey%2Fbump-package-version-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yakovlev-alexey","download_url":"https://codeload.github.com/yakovlev-alexey/bump-package-version-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239550283,"owners_count":19657541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","bumpversion","conventional-commits","github","github-actions","npm","package","semantic-versioning"],"created_at":"2024-11-07T10:46:23.475Z","updated_at":"2025-11-08T07:30:38.931Z","avatar_url":"https://github.com/yakovlev-alexey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bump Package Version Action\n\nA simple GitHub Action to automatically bump npm versions. Designed to be used with [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).\n\n## Table of Contents\n\n-   [Bump Package Version Action](#bump-package-version-action)\n-   [Table of Contents](#table-of-contents)\n-   [Usage](#usage)\n-   [Recipes](#recipes)\n-   [Comparison to other actions](#comparison-to-other-actions)\n-   [Contributing](#contributing)\n-   [Acknowledgments](#acknowledgments)\n-   [License](#license)\n\n## Usage\n\nThis action allows you to automatically update versions in your `package.json`. It scans newly pushed commits for keywords in messages. If any matches are found it updates the version in `package.json` and optionally (enabled by default) commits, tags and pushes changes to caller branch. There is also support for canary versions - if this action was called in a `pull_request` event, it will create a canary version from the latest commit (according to all commit messages in PR).\n\n\u003e It is however important that only `pull_request` events from the base repository are handled by default. It is unsafe to expose publishing tokens to use in PRs from unknown contributors and GitHub Actions themself do not allow you to access secrets in such Pull Requests. Therefore by default `abort-for-forks` option is enabled. If you have a use for this action in fork PRs disable this option.\n\n```yml\njobs:\n    bump:\n        runs-on: ubuntu-latest\n        steps:\n            - uses: actions/checkout@v2\n              with:\n                  fetch-depth: 0\n\n            - name: \"Bump version\"\n              uses: \"yakovlev-alexey/bump-package-version-action@main\"\n              env:\n                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n              with:\n                  # messages starting with this words will result in a major version bump\n                  major-wording: \"feat!\"\n                  # messages starting with this words will result in a minor version bump\n                  minor-wording: \"feat\"\n                  # messages starting with this words will result in a patch version bump\n                  # separate keywords using a comma\n                  patch-wording: \"fix,docs\"\n\n                  # create a custom commit message ({{version}} will be replaced with the actual version after bump)\n                  commit-message: \"ci: version bump to {{version}}\"\n                  # skip pushing resulting tag/commit\n                  skip-push: \"false\"\n                  # skip tagging resulting version\n                  skip-tag: \"false\"\n                  # skip commiting resulting bump\n                  skip-commit: \"false\"\n                  # skip commiting, tagging and pushing for canary versions (PRs)\n                  skip-for-canary: \"true\"\n                  # abort action immediately when called in PR from a fork\n                  abort-for-forks: \"true\"\n```\n\n## Recipes\n\nIn this section you may find a few ready-made workflows to use in your projects.\n\n### Basic npm package\n\nA very basic [workflow](https://gist.github.com/yakovlev-alexey/b8019044854bb196307e1d7eefc663ab) with no validations made just for automatically versioning and publishing your npm package on pushes to your `main` branch. May also publish RCs if `pull_request` event is enabled.\n\n```yml\n# .github/workflows/main.yml\nname: main\n\non:\n    push:\n        branches:\n            - main\n    pull_request:\n        branches:\n            - main\n\njobs:\n    release:\n        runs-on: ubuntu-latest\n        steps:\n            - uses: actions/checkout@v2\n              with:\n                  fetch-depth: 0\n\n            - name: Bump version\n              id: bump-version\n              uses: \"yakovlev-alexey/bump-package-version-action@v1.1.0\"\n              env:\n                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n              with:\n                  major-wording: \"feat!\"\n                  minor-wording: \"feat\"\n                  patch-wording: \"fix\"\n\n            - name: Publish npm\n              if: steps.bump-version.outputs.version != null\n              env:\n                  NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}\n              run: yarn publish --non-interactive --registry https://registry.npmjs.org/\n```\n\n### Advanced npm package\n\nA more advanced example with multiple jobs to reflect different stages of CI. This workflow allows static type checking, test running and publishing as separate jobs with caching to increase execution speed. Whole file is available as a [Gist](https://gist.github.com/yakovlev-alexey/75a1d1e519eff586b518624c81fc0930).\n\n```yml\n# .github/workflows/main.yml\nname: main\n\non:\n    push:\n        branches:\n            - main\n    pull_request:\n        branches:\n            - main\n\njobs:\n    sanity:\n        runs-on: ubuntu-latest\n        steps:\n            # ...\n\n    unit:\n        needs: sanity\n        runs-on: ubuntu-latest\n        steps:\n            # ...\n\n    release:\n        needs: unit\n        runs-on: ubuntu-latest\n        steps:\n            - uses: actions/checkout@v2\n              with:\n                  fetch-depth: 0\n\n            - name: Bump version\n              id: bump-version\n              uses: \"yakovlev-alexey/bump-package-version-action@v1.1.0\"\n              env:\n                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n              with:\n                  major-wording: \"feat!\"\n                  minor-wording: \"feat\"\n                  patch-wording: \"fix\"\n\n            - name: Set cache directory\n              # unfortunately a job can't be stopped with success preemptively\n              if: steps.bump-version.outputs.version != null\n              id: yarn-cache-dir-path\n              run: echo \"::set-output name=dir::$(yarn cache dir)\"\n\n            - uses: actions/cache@v2\n              if: steps.bump-version.outputs.version != null\n              id: yarn-cache\n              with:\n                  path: ${{ steps.yarn-cache-dir-path.outputs.dir }}\n                  key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}\n                  restore-keys: |\n                      ${{ runner.os }}-yarn-\n\n            - name: Install dependencies\n              if: steps.bump-version.outputs.version != null\n              run: yarn --frozen-lockfile\n\n            - name: Publish npm\n              if: steps.bump-version.outputs.version != null\n              env:\n                  NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}\n              run: yarn publish --non-interactive --registry https://registry.npmjs.org/\n```\n\n### Other cases\n\n`bump-package-version-action` can be used for other cases as well: for example, you might want to update package version and create website build with this new version. Only differences compared to previous example would be in the final steps of the jobs. You might not even want to publish anything - just keep track of versions. This is the case with `bump-package-version-action` itself: Actions do not need to be published to npm, but having separate tags with semantic versions is very helpful. Check out [`main.yml`](/.github/workflows/main.yml).\n\n```yml\n# .github/workflows/main.yml\nname: \"Main\"\n\non:\n    push:\n        branches:\n            - main\n\njobs:\n    node-ci:\n        runs-on: ubuntu-latest\n        steps:\n            - uses: actions/checkout@v2\n              with:\n                  fetch-depth: 0\n\n            - name: Install dependencies\n              run: yarn --frozen-lockfile\n            - name: Lint\n              run: yarn lint\n\n            - name: \"Bump version\"\n              uses: \"yakovlev-alexey/bump-package-version-action@main\"\n              env:\n                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n              with:\n                  minor-wording: \"feat\"\n                  major-wording: \"feat!,BREAKING CHANGES\"\n                  patch-wording: \"fix\"\n```\n\n## Comparison to other actions\n\nYou may ask: how is this action different from a few other implementations of automated version bumps?\n\nMy primary concern with other packages was code quality - I was unable to fully understand which code was responsible for what. That's why this action is written completely in TypeScript and has linters installed.\n\nI was also unsure of how other actions bump versions (partly due to spaghetti code). In this action I'm heavily investing in providing great documentation, support and ready to use recipes.\n\nI also have a roadmap of improving this action with one the great upcoming features being ability to use plugins - `bump-package-version-action` should turn into `bump-version-action` with a few plugins like `bump-npm-version-action`, `bump-yarn-version-action`, `bump-pypi-version-action` and so on. See [issues](https://github.com/yakovlev-alexey/nestjs-minio-module/issues) for more details on future plans\n\n## Contributing\n\nFeel free to send any suggestions in [GitHub issues](https://github.com/yakovlev-alexey/nestjs-minio-module/issues): comment or vote on an existing issue, open a new one or create a Pull Request with your feature.\n\n## Acknowledgments\n\nThis package is largely inspired by [`gh-action-bump-version`](https://github.com/phips28/gh-action-bump-version) by [`@phips28`](https://github.com/phips28).\n\n## License\n\n[MIT](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakovlev-alexey%2Fbump-package-version-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyakovlev-alexey%2Fbump-package-version-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyakovlev-alexey%2Fbump-package-version-action/lists"}