GithubHelp home page GithubHelp logo

standard-version_action's Introduction

Standar version

Add Standar version incredibly fast into your project!

Features

  • Allow prerelease
  • Super easy to setup
  • Automatically bump version
  • Automatically create changelog
  • Update package.json your repo with the new version

Are you using conventional commits and semver?

Then you are ready to use this github action.

Usage

  1. Follow the Conventional Commits Specification in your repository.
  2. Create a .github/workflows/bumpversion.yaml with the Sample Workflow

Sample Workflow

name: Bump version

on:
  push:
    branches:
      - master

jobs:
  bump_version:
    if: "!startsWith(github.event.head_commit.message, 'bump:')"
    runs-on: ubuntu-latest
    name: "Bump version and create changelog with commitizen"
    steps:
      - name: Check out
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
          token: "${{ secrets.GITHUB_TOKEN }}"
      - id: get_version
        name: Create bump and changelog
        uses: Sha-code/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
      - run: echo ${{ steps.get_version.outputs.version }}
      - run: echo ${{ steps.get_version.outputs.type }}

Variables

Name Description Default
github_token Token for the repo. Can be passed in using ${{ secrets.GITHUB_TOKEN }} required -
dry_run Run without creating commit, output to stdout false
repository Repository name to push. Default or empty value represents current github repository current one
branch Destination branch to push changes master
prerelease Set as prerelease {alpha,beta,rc} choose type of prerelease -

Troubleshooting

Other actions are not triggered when the tag is pushed

This problem occurs because secrets.GITHUB_TOKEN does not trigger other actions by design.

To solve it you must use a personal access token in the checkout and the commitizen steps.

Follow the instructions in [commitizen's documentation][cz-docs-ga]

I'm not using conventional commits, I'm using my own set of rules on commits

The only way to use this is to switch to the standard :

Read more about standard

standard-version_action's People

Contributors

bryanmacfarlane avatar dependabot[bot] avatar fregante avatar friederbluemle avatar hross avatar jasonetco avatar sha-code avatar theworkfsz avatar wesleytodd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.