Skip to content

Latest commit

 

History

History
58 lines (41 loc) · 1.77 KB

README.md

File metadata and controls

58 lines (41 loc) · 1.77 KB

github-tag-action

A Github Action to automatically bump and tag master, on merge, with the latest semver formatted version.

Build Status Stable Version

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: anothrNick/github-tag-action@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        REPO_OWNER: anothrNick

Be sure to set the REPO_OWNER environment variable so that the action tags your repo.

NOTE: This creates a lightweight tag

Bumping

Any commit message with #major, #minor, or patch will trigger the respective version bump.

Workflow

  • Add this action to your repo
  • Commit some changes
  • Either push to master or open a PR
  • On push(or merge) to master, Action will:
    • Get latest tag
    • Bump tag with minor version unless any commit message contains #major or #patch
    • Pushes tag to github

Credits

fsaintjacques/semver-tool

Projects using github-tag-action

A list of projects using github-tag-action for reference.

  • another/github-tag-action (uses itself to create tags)

  • anothrNick/json-tree-service

    Access JSON structure with HTTP path parameters as keys/indices to the JSON.