Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/damienaicheh/extract-version-from-tag-action
https://github.com/damienaicheh/extract-version-from-tag-action
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/damienaicheh/extract-version-from-tag-action
- Owner: damienaicheh
- License: mit
- Created: 2021-06-28T07:33:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-25T12:38:37.000Z (5 months ago)
- Last Synced: 2024-10-31T10:49:02.460Z (2 months ago)
- Language: TypeScript
- Size: 241 KB
- Stars: 15
- Watchers: 3
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Extract version from tag action
This action extract the version from tag and provide different outputs to use in the `job`.
## Usage
To be able to use this action, you must retreive all the history of the repository by using the `fetch-depth` option of the `actions/checkout@v4` as bellow
```yaml
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Mandatory to use the extract version from tag action- name: Extract version from tag
uses: damienaicheh/[email protected]
```You will then have access to these outputs:
- The major digit: `$MAJOR`
- The minor digit: `$MINOR`
- The patch digit: `$PATCH`- If it's a pre-release with like for exemple the `-beta1` the value `beta1` will be extracted inside `$PRE_RELEASE`. If no pre-release is found this output will be empty.
- The number of commits will be available inside: `$NUMBER_OF_COMMITS`.
- The number of commits since tag will be available inside: `$NUMBER_OF_COMMITS_SINCE_TAG`.