Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tool3/bump
⪮ github action for bumping npm package versions
https://github.com/tool3/bump
github-action javascript-action npm release
Last synced: about 2 months ago
JSON representation
⪮ github action for bumping npm package versions
- Host: GitHub
- URL: https://github.com/tool3/bump
- Owner: tool3
- License: mit
- Created: 2019-12-30T15:23:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-22T14:44:32.000Z (8 months ago)
- Last Synced: 2024-10-31T10:49:58.894Z (3 months ago)
- Topics: github-action, javascript-action, npm, release
- Language: JavaScript
- Homepage:
- Size: 15.9 MB
- Stars: 6
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bump Action
Bump allows you to..well...bump an npm package version using a commit message, and push the package.json update back to the repository.
[![](https://github.com/tool3/bump/workflows/bump/badge.svg)](https://github.com/tool3/bump/actions)# Create an action from this template
Click the `Use this Template` and provide the new repo details for your action
# Options
## inputs:
### `github_token`
**required**
github access token### `user`
user name
default: the user of the current push### `email`
user email
default: current user email### `branch`
branch to work against
default: `master`### `unrelated`
use `--allow-unrelated-histories`
deafult: `false`## outputs:
### `version`
the version being tagged and pushed.
# Bump strategy
If your head (latest) commit has the keywords `#patch`, `#minor` or `#major` - this action will use that to perform the bump.
Defaults to `patch`.## Usage
You can use this action by referencing any branch or git tag:
```yaml
bump:
runs-on: ubuntu-latest
steps:
- uses: tool3/bump@master #latest
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
user: "First Last"
email: "[email protected]"
```## :warning: Important usage notes
- this action requires `@actions/checkout` to be defined in a previous step. e.g:
```yaml
bump:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: tool3/bump@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
user: "First Last"
email: "[email protected]"
```- this action pushes the package.json version update back to the repo (defaults to master).
See the [actions tab](https://github.com/tool3/bump/actions) for runs of this action! :rocket:
# Example
```yaml
name: releaseon:
push:
branches:
- releasejobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: tool3/bump@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
unrelated: truepublisher:
needs: tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: tool3/publisher@master
with:
npm_token: ${{ secrets.NPM_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
scope: "@tool3"
```