-
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.46 KB
/
version.yaml
File metadata and controls
44 lines (42 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Versioning
on:
workflow_call:
inputs:
runner:
description: "Runner Group Name"
type: string
required: false
default: "ubuntu-latest"
outputs:
MajorMinorPatch:
description: Major.Minor.Patch version
value: ${{ jobs.version.outputs.MajorMinorPatch }}
FullSemVer:
description: Full semantic version
value: ${{ jobs.version.outputs.FullSemVer }}
jobs:
version:
name: Find correct version
runs-on: ${{ inputs.runner }}
outputs:
MajorMinorPatch: ${{ steps.output.outputs.MajorMinorPatch }}
FullSemVer: ${{ steps.output.outputs.FullSemVer }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.1.1
with:
versionSpec: '6.0.x'
- name: Determine Version
uses: gittools/actions/gitversion/execute@v3.1.1
with:
useConfigFile: true
configFilePath: .github/GitVersion.yaml
- id: output
run: |
echo "MajorMinorPatch=${{ env.GitVersion_MajorMinorPatch }}" >> "$GITHUB_OUTPUT"
echo "FullSemVer=${{ env.GitVersion_MajorMinorPatch }}${{ env.GitVersion_PreReleaseTagWithDash}}" >> "$GITHUB_OUTPUT"
echo "# Build version: ${{ env.GitVersion_MajorMinorPatch }}" >> $GITHUB_STEP_SUMMARY
echo "## FullSemVer: ${{ env.GitVersion_FullSemVer }}" >> $GITHUB_STEP_SUMMARY