Skip to content

A GitHub action to build a version number based on the Git tags and branches

License

Notifications You must be signed in to change notification settings

toitlang/action-git-version

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

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

action-git-version

A GitHub action to build a version number based on the Git tags and branches

Only uses CMake and Git to build the version number.

Basic usage

See action.yml for a complete list of options and outputs.

steps:
- uses: actions/checkout@v4
  with:
    # This action needs access to the history and tags.
    # With 'fetch-depth: 0' the action fetches the complete history and all tags.
    # You can also limit the depth to a certain number and run
    # with 'fetch-tags: true'. The produced version number might not
    # be accurate in that case.
    fetch-depth: 0

- name: Run Git Version
  id: gitversion
  uses: toitlang/action-git-version@v1.1.0

- name: Use the version
  shell: bash
  run: |
    echo ${{ steps.gitversion.outputs.version }}

About

A GitHub action to build a version number based on the Git tags and branches

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages