JSPM

  • Created
  • Published
  • Downloads 22
  • Score
    100M100P100Q68996F
  • License Apache-2.0

Automate versioning, changelog creations and GitHub releases using bash, GitHub action, npm or docker.

Package Exports

  • bump-everywhere
  • bump-everywhere/scripts/bump-everywhere.sh

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bump-everywhere) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

bump-everywhere

🚀 Automate versioning, changelog creation, README updates and GitHub releases using GitHub Actions,npm, docker or bash.

contributions welcome Quality checks Bump & release Publish Test Code size Docker image size Auto-versioned by bump-everywhere

functions of bump-everywhere

Features

Allows you to automatically:

  • Bump your sematic git tag by increasing the patch version
  • Create & commit a changelog file
  • If npm project then bump package.json version and commit
  • Check README.md file, if it has references to older version, update with never version.
  • Create a release on GitHub with auto-generated release notes

It supports safe re-runs, it means that if you can run it for an already bumped or tagged repository, it'll not increase the version as everything is still up-to-date. It protects against recursive runs.

Usage

Option 1. Use GitHub actions

- uses: undergroundwires/bump-everywhere@master
  with:
    # Repository name with owner to bump & release. For example, undergroundwires/bump-everywhere
    # (Optional) Default: ${{ github.repository  }}
    repository: ''

    # Name of the user who will do the bump commit
    # (Optional) Default: ${{ github.actor }}
    user: ''

    # Commit message that will be used in the bump commit
    # (Optional) Default: ⬆️ bump everywhere to {{version}}
    commit-message: ''

    # Personal access token (PAT) used to clone & push to the repository.
    # If you use default, it'll not trigger other actions, but your own PAT then it triggers new actions
    # (Optional) Default: ${{ github.token }}
    git-token: ''

    # The type of the GitHub release
    # Options: 'release' | 'prerelease' | 'draft' | 'none' (does not release)
    # (Optional) Default: 'release'
    release-type: ''

    # Personal access token (PAT) used to release to GitHub.
    # Used only if release-type is not "none"
    # If you use default, it'll not trigger other actions, but your own PAT then it triggers new actions
    # (Optional) Default: ${{ github.token }}
    release-token: ''

Option 2. Use Docker

  • To get the image you can either:

    • Pull from docker hub using docker pull undergroundwires/bump-everywhere:latest
    • Or build image yourself using docker build . --tag undergroundwires/bump-everywhere:latest
  • Run with arguments:

      docker run undergroundwires/bump-everywhere \
        --repository "undergroundwires/privacy.sexy" \
        --user "bot-user" \
        --git-token "GitHub PAT for pushes" \
        --release-type "prerelease" \
        --release-token "GitHub PAT for releases" \
        --commit-message "⬆️ bump to {{version}}"

Option 3. Use npm

  1. (Optionally) install globally: npm install -g bump-everywhere
    • or locally: npm install bump-every-where --save-dev
  2. Run npx bump-everywhere <parameters...>

Option 4. Use scripts

  1. Ensure bash (4 or newer), git, curl, jq exists in your environment
    • On Alpine: apk add bash git curl jq
    • On Windows: choco install git curl jq and use Git Bash
  2. Clone this repository: git clone https://github.com/undergroundwires/bump-everywhere
    • or optionally add this repository as git submodule: git submodule add https://github.com/undergroundwires/bump-everywhere
  3. Call the script: bash "scripts/bump-everywhere.sh" <parameters>

Updating minor & major versions

  • You manually tag your last commit to update major & minor versions.
  • E.g.
    • git commit -m "bumped version to 1.3.1" --allow-empty
    • git tag 1.3.1
    • git push && git push origin 1.3.1

All scripts

You can also use following scripts individually (check script files for usage, prerequisites & dependencies):

Some example usages

Support

  • Give it a star ⭐
  • Feel free to use the badge in the README.md of repository where you use bump-everywhere:
    • (it'll look like: Auto-versioned by bump-everywhere)
[![Auto-versioned by bump-everywhere](https://github.com/undergroundwires/bump-everywhere/blob/master/badge.svg?raw=true)](https://github.com/undergroundwires/bump-everywhere)

Tests

  • Automated tests
    • Test all: bash ./tests/run.sh
    • Defined as .test.sh files in ./tests
  • Manual tests: See documentation in docker-entrypoint

GitOps

CI/CD is fully automated for this repo using different GIT events and GitHub actions.

GitOps flow