Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 1.36 KB

README.md

File metadata and controls

68 lines (51 loc) · 1.36 KB

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 }}"