Skip to content

A collection of Github actions related to version management

License

Notifications You must be signed in to change notification settings

CapsCollective/version-actions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Actions for Version Management

This repo provides a collection of Github actions related to software version management, including:

See below for more details on usage of each action.

extract-version

This action extracts a version number or string from a file by regex, utilising Ubuntu's grep regex.

Inputs

version-file

Required The file containing the version number. Default undefined.

version-regex

Required The regex expression to capture the semantic version. Default [0-9.\-A-z]*.

Outputs

version-number

The extracted version number (e.g. 1.0.0).

version-string

The extracted version string (e.g. v1.0.0).

Example usage

- uses: CapsCollective/version-actions/[email protected]
  with:
    version-file: build_info.txt
    version-regex: version=\"\K[0-9.\-A-z]*
  id: extract-version

- run: echo ${{ steps.extract-version.outputs.version-string }}

check-version-bump

This action check whether a semantic version number has been bumped. If the new-version is behind or equal to the old-version, the action will fail with an AntiquatedVersionError highlighting the relevant issue.

Inputs

new-version

Required The new semantic version. Default v0.0.0.

old-version

Required The old semantic version. Default v0.0.0.

Example usage

- uses: CapsCollective/version-actions/[email protected]
  with:
    new-version: v0.1.0
    old-version: v0.0.1

About

A collection of Github actions related to version management

Resources

License

Stars

Watchers

Forks

Packages

No packages published