Skip to content

wendbv/calver-tag-action

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

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Tag using Calendar Versioning

Create a tag using Calendar Versioning, e.g. v2021.1.0.

Inputs

prerelease

If set, tag the version as prerelease - set to e.g. alpha or beta

prefix

Required Default "v".

output-only

Only outputs the new version and don't actually tag the commit

Outputs

version

The new version

Example usage

Create a file named .github/workflows/deploy.yml in your repo and add the following:

on: [push]

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - uses: wendbv/[email protected]

You can also pass in a prerelease and disable the prefix, this will generate a version like 2021.1.0-beta.0.

on: [push]

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - uses: wendbv/[email protected]
        with:
          prerelease: beta
          prefix: ''

You can add output-only to only output the new version and don't actually tag the commit.

on: [push]

jobs:
  deploy:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - uses: wendbv/calver-tag-action@v2
        id: tag-version
        with:
          output-only: true
      - name: Get the output version
        run: echo "The new version is was ${{ steps.tag-version.outputs.version }}"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published