This repo provides a collection of Github actions related to software version management, including:
See below for more details on usage of each action.
This action extracts a version number or string from a file by regex, utilising Ubuntu's grep regex.
Required The file containing the version number. Default undefined
.
Required The regex expression to capture the semantic version. Default [0-9.\-A-z]*
.
The extracted version number (e.g. 1.0.0
).
The extracted version string (e.g. v1.0.0
).
- uses: CapsCollective/version-actions/extract-version@v1.0
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 }}
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.
Required The new semantic version. Default v0.0.0
.
Required The old semantic version. Default v0.0.0
.
- uses: CapsCollective/version-actions/check-version-bump@v1.0
with:
new-version: v0.1.0
old-version: v0.0.1