Skip to content

WormJim/version-bump-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

About

A Github action, No Docker, to bump your packages. This attempts to follow SemVer2.0.


Note

Does not support premajor, preminor, prepatch or prerelease at this time.

Usage

Workflow

name: CI

on:
  push:
    branches: [main]

jobs:
  bump-version:
    name: Bump Version on Main
    runs-on: ubuntu-latest

    steps:
      - name: Bump Version
        id: version-bump
        uses: WormJim/version-bump-action@v0.1.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          commit_message: Bump version to {{version}}
          minor: Feature, Feat, feat
          patch: Patch, Fix, ''

      - name: Show Version Bump
        run: |
          echo "Bumped Version to ${{ steps.version-bump.outputs.version }}"

Keys

inputs

Use the following inputs with the steps.with key

Key Default Value Type Description
token ${{ github.token }} String Github Public Access Token
commit_message CI: Bump version to {{version}} String (Optional) Set the commit message for the version bump
path_to_package ${{ github.workspace }} String (Optional) The path to the repositories package.json in the current Github Runner
tag false Boolean (Optional) If true (default false) a version tag is pushed
major BREAKCING CHANGE,major String (Optional) Phrases to test head commit against. Your inputs extend default phrases.
minor feature,minor String (Optional) Phrases to test head commit against. Your inputs extend default phrases.
patch '' String (Optional) Phrases to test head commit against. Your inputs extend default phrases.
ref ${{ github.ref }} String (Optional) The target branch to push the version bump commit to.
bump false String (Optional) Pass user defined version. Must be a valid semver string. Ex. 0.1.0. The "v" is optional
persist_phrase false Boolean (Optional) Persist default phrases with custom phrases.

outputs

The Following outputs will be emitted

Key Default Value Type Description
version 0.1.0 String The version to which your repo was bumped

License

Umm...Sure!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published