kobtea / release-tag-action

Automatically create tags from the VERSION file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cut Release Tag

This GitHub Action watches the VERSION file, and if the tag with the same name does not exist yet, create one.

Usage

Requirements

This action expects

  • VERSION file exists in a repository
  • VERISON file contains only SemVer string

Inputs

  • force: Replace an existing tag (default: false)
  • message: Tag message, __VERSION__ will replace its version number (default: release __VERSION__)
  • only_major_version: Use only major version (default: false)
  • prefix: Prefix for release tag (default: v)
  • suffix: Suffix for release tag (default: '')
  • version_file: Path to VERSION file (default: VERSION)

Outputs

  • tag: Name for release tag

Example workflow

The following example will create v1.0.0 tag at GitHub repository.
(IMPORTANT) If you want to trigger this tagging event, you need to set a personal access token instead of secrets.GITHUB_TOKEN (see: About workflow events).

$ cat VERSION
1.0.0
    steps:
      - uses: actions/checkout@v2
        with:
          token: ${{ secrets.PERSONAL_TOKEN }}
      - uses: kobtea/release-tag-action@v0

The following example will create v1 tag, such a stable release. Every time this step is triggered, this v1 tag will override.

    steps:
      - uses: actions/checkout@v2
        with:
          token: ${{ secrets.PERSONAL_TOKEN }}
      - uses: kobtea/release-tag-action@v0
        with:
          force: true
          only_major_version: true

For more example, see below.

About

Automatically create tags from the VERSION file

License:MIT License


Languages

Language:Shell 90.1%Language:Dockerfile 9.9%