Skip to content

Bump version numbers in files whenever new releases are published to GitHub.

License

Notifications You must be signed in to change notification settings

toolmantim/boomper

Repository files navigation

Boomper Logo

Bump version numbers in files whenever new releases are published to GitHub. Built with Probot.


Install the GitHub App


NPM package

Usage

Firstly, you’ll need to install the Boomper GitHub App. This listens out for any releases, or any changes to the configuration.

Then, add a .github/boomper.yml configuration file to the GitHub repository where you publish new releases to.

For example, given the following .github/boomper.yml file:

updates:
- path: README.md
  pattern: 'https://someurl.com/(v.*)/download.zip'

And given the following README.md file:

Install with `curl https://someurl.com/v1.0.0/download.zip`

Then when a new release is published (e.g. v2.0.0), Boomper will update the README.md to:

Install with `curl https://someurl.com/v2.0.0/download.zip`

Examples

updates:
- path: README.md
  pattern: 'my-org/my-plugin#(v.*):'

Configuration options

You can configure Boomper using the following key in your .github/boomper.yml file:

Key Required Description
updates Required A list of paths and patterns to update when a new release is published.
updates.[].path Required The path to the file to update.
updates.[].pattern Required The regular expression containing a single group, which will be used to match and update the version number in the file.
updates.[].branch Optional The branch to update. Default is the repository's default branch (e.g. master).
branches Optional The branches to listen for configuration updates to .github/boomper.yml. Useful if you want to test the app on a pull request branch. Default is "master".
skip-ci Optional Appends [ci skip] to commit messages to prevent triggering additional CI builds. Default is false.

Developing

If you have Node v10+ installed locally, you can run the tests, and a local app, using the following commands:

# Install dependencies
yarn

# Run the tests
npm test

# Run the app locally
npm start

If you don't have Node installed, you can use Docker Compose:

# Run the tests
docker-compose run --rm app npm test

Contributing

Third-pary contributions are welcome! 🙏🏼 See CONTRIBUTING.md for step-by-step instructions.

If you need help or have a question, let me know via a GitHub issue.

Deployment

If you want to deploy your own copy of Boomper, follow the Probot Deployment Guide.

Releasing

Run the following command:

git checkout master && git pull && npm version [major | minor | patch]

The command does the following:

  • Ensures you’re on master and don't have local, un-commited changes
  • Bumps the version number in package.json based on major, minor or patch
  • Runs the postversion npm script in package.json, which:
    • Pushes the tag to GitHub
    • Publishes the npm release
    • Opens the GitHub releases page so you can publish the release notes