Skip to content

GitHub Action for updating semver tags when a release is published

License

Notifications You must be signed in to change notification settings

tchupp/actions-update-semver-tags

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions: update-semver-tags

GitHub Action for updating semver tags when a release is published.

SemVer (or Semantic Versioning) is a strategy for versioning with a Major, Minor, and Patch version.

Let's say your latest release is version v1.2.3. It's often convenient to have tags for v1.2 and v1 for loose version pinning.

This GitHub Action will update the v1.2 and v1 tags when a new release is published.

Shut up and show me the copy/paste

Usage

This action can be used as follows:

      - uses: tchupp/actions-update-semver-tags@v1

Assumptions

The most common cause for issues involves a mismatch in expectations.
Please read below to make sure your setup aligns with the assumptions made by this action.

Setup

This action expects that the repo has been checked out.
The following snippet from an example job, which can be found below.

...
    steps:
      - name: Checkout
        uses: actions/checkout@v2
...

Version tags

This action expects that your repo is tagged using semantic versions, ie v1.2.3

Inputs

This action has no inputs.

Examples

Simple Setup

name: Release Tagger

on:
  push:
    tags:
      - 'v([0-9]+)\.([0-9]+)\.([0-9]+)'
      - 'v([0-9]+)\.([0-9]+)\.([0-9]+)-(alpha|beta|rc)'
  release:
    types:
      - published
      - edited

jobs:
  update-semver-tags:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Update Semver Tags
        uses: tchupp/actions-update-semver-tags@v1

About

GitHub Action for updating semver tags when a release is published

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages