This GitHub CLI extension can be used determine the semantic version to release.

First it will search all tags and traverse up and down the git log to find the latest tag and inspect all commits made since against the conventional commits standard v1.0.0.


Usage (commandline)

Install the extension by running:

gh extension install koozz/gh-semver

Run this extension with its keyword (default is semver):

gh semver

View more options with:

gh semver -help

In case of a newer version, upgrade by running:

gh extension upgrade koozz/gh-semver

Usage (GitHub Actions)

This extension can be used in a GitHub Actions workflow to determine the next semantic version.

In your workflow;

  • make sure the checkout has fetch-depth: 0
  • install the extension
  • call the extension
  • use the version as you see fit

# ...

      - name: Checkout repository
        uses: actions/checkout@v3
          fetch-depth: 0
      - name: SemVer
        id: semver
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          gh extension install koozz/gh-semver
          gh semver -action
      - name: Tag
        run: |
          git tag ${{ steps.semver.outputs.version }}

# ...

Example can be found in .github/workflows/tag-and-release.yml


Things on the roadmap:

  • Semantic Versioning(-ish) for modules in a mono-repo;
    • Limit versioning to a directory within the repository.
    • Prefix the version with a module name.
  • Tests to make the software more robust and reliable.


Help me out and describe the issue as complete a possible.


Apache 2.0


View Github