Skip to content

fabricepipart/github-tag-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-tag-action

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

Build Status Stable Version Latest Release

Medium Post: Creating A Github Action to Tag Commits

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.

About

A Github Action to tag a repo on merge.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 94.7%
  • Dockerfile 5.3%