Giter Club home page Giter Club logo

github-tag-action's Introduction

GitHub Tag Action

A Github Action to automatically bump and tag master, on merge, with the latest SemVer formatted version. Works on any platform.

Usage

name: Bump version
on:
  push:
    branches:
      - master
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - name: Bump version and push tag
        uses: mathieudutour/github-tag-action@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}

Inputs

  • github_token (required) - Required for permission to tag the repo. Usually ${{ secrets.GITHUB_TOKEN }}.
  • default_bump (optional) - Which type of bump to use when none explicitly provided (default: patch).
  • tag_prefix (optional) - A prefix to the tag name (default: v).
  • release_branches (optional) - Comma separated list of branches (bash reg exp accepted) that will generate the release tags. Other branches and pull-requests generate versions postfixed with the commit hash and do not generate any tag. Examples: master or .* or release.*,hotfix.*,master... (default: master).
  • create_annotated_tag (optional) - Boolean to create an annotated rather than a lightweight one (default: false).
  • dry_run (optional) - Do not perform taging, just calculate next version and changelog, then exit

Outputs

  • new_tag - The value of the newly created tag. Note that if there hasn't been any new commit, this will be undefined.
  • new_version - The value of the newly created tag without the prefix. Note that if there hasn't been any new commit, this will be undefined.
  • previous_tag - The value of the previous tag (or 0.0.0 if none).
  • changelog - The conventional changelog since the previous tag.

Note: This action creates a lightweight tag by default.

Bumping

The action will parse the new commits since the last tag using the semantic-release conventions.

semantic-release uses the commit messages to determine the type of changes in the codebase. Following formalized conventions for commit messages, semantic-release automatically determines the next semantic version number.

By default semantic-release uses Angular Commit Message Conventions.

Here is an example of the release type that will be done based on a commit messages:

Commit message Release type
fix(pencil): stop graphite breaking when too much pressure applied Patch Release
feat(pencil): add 'graphiteWidth' option Minor Release
perf(pencil): remove graphiteWidth option

BREAKING CHANGE: The graphiteWidth option has been removed.
The default graphite width of 10mm is always used for performance reasons.
Major Release

If no commit message contains any information, then default_bump will be used.

Credits

anothrNick/github-tag-action - a similar action using a Dockerfile (hence not working on macOS)

github-tag-action's People

Contributors

mathieudutour avatar stschmaltz avatar qvistgaard avatar

Watchers

James Cloos 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.