Files
actions/docs/examples/github/gitversion/index.md
2020-09-25 12:14:30 +02:00

28 lines
671 B
Markdown

# Example
```yaml
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.2
with:
versionSpec: '5.2.x'
```
# Example
```yaml
steps:
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Use GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/execute@v0.9.2
- run: |
echo "Major: ${{ steps.gitversion.outputs.major }}"
echo "Minor: ${{ steps.gitversion.outputs.minor }}"
echo "Patch: ${{ steps.gitversion.outputs.patch }}"
name: Output
```