https://github.com/remorses/bump-version
Action to bump version files
https://github.com/remorses/bump-version
Last synced: 9 months ago
JSON representation
Action to bump version files
- Host: GitHub
- URL: https://github.com/remorses/bump-version
- Owner: remorses
- Created: 2019-08-14T20:13:59.000Z (over 6 years ago)
- Default Branch: js
- Last Pushed: 2023-07-07T12:59:15.000Z (over 2 years ago)
- Last Synced: 2025-04-14T22:02:21.138Z (9 months ago)
- Language: JavaScript
- Size: 18.5 MB
- Stars: 36
- Watchers: 2
- Forks: 12
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bump version
**No longer maintained**
This actions does 3 things:
- Bumps the version number in the provided `version_file`.
- Creates a tag for the new version (prefixed with the `prefix` input if provided).
- Bumps all the versions under lines with the pattern `[bump]` (or `[bump if prefix]` if a prefix is provided).
**Please use the `js` branch as it is the one up to date.**
## Usage:
```yaml
- name: Bump version
uses: remorses/bump-version@js
with:
version_file: ./VERSION
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
## Usage in a monorepo:
You can give a prefix to the tag, the action will relace version after line containing the pattern `[bump if {prefix}]`
Useful if you have many versions to bump.
```yaml
- name: Bump versions
uses: remorses/bump-version@js
with:
version_file: ./dir2/VERSION
prefix: dir2 # this will prefix the created tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# will create the tag {prefix}_{version}
```
## ~~Using a prerelease tag~~
> This does not work with npm because you need to pass the `--tag` directly in the npm publish command
You can add a prerelease tag to a version using the `prerelease_tag` input
For example if you have `1.0.0` in `./VERSION`, the workflow below will commit the new version `1.0.1-alpha.0`
After the first prerelease `bump-version` will increase the tag version: `1.0.1-alpha.0` wil become `1.0.1-alpha.1`
```yaml
- name: Bump versions
uses: remorses/bump-version@js
with:
version_file: ./VERSION
prerelease_tag: alpha
ignore: dist, ignored_folder
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
## Created annotations
The action also creates annotations on the code and on the actions page

