1
1
name : Git Version
2
2
author : " Codacy"
3
- description : ' Semver versioning based on the git history and commit messages of your repository.'
3
+ description : " Semver versioning based on the git history and commit messages of your repository."
4
4
branding :
5
- icon : ' git-branch'
6
- color : ' gray-dark'
5
+ icon : " git-branch"
6
+ color : " gray-dark"
7
7
inputs :
8
8
tool-version :
9
- description : ' The version of the tool to be ran'
9
+ description : " The version of the tool to be ran"
10
10
required : true
11
11
default : latest
12
+ tool-installation-path :
13
+ description : " The path where the tool will be installed"
14
+ required : false
15
+ default : /usr/local/bin
12
16
release-branch :
13
- description : ' The name of the release branch'
17
+ description : " The name of the release branch"
14
18
required : true
15
19
default : master
16
20
dev-branch :
17
- description : ' The name of the dev branch'
21
+ description : " The name of the dev branch"
18
22
required : true
19
23
default : dev
20
24
minor-identifier :
21
- description : ' The string or regex to identify a minor release commit'
25
+ description : " The string or regex to identify a minor release commit"
22
26
required : true
23
- default : ' feature:'
27
+ default : " feature:"
24
28
major-identifier :
25
- description : ' The string or regex to identify a major release commit'
29
+ description : " The string or regex to identify a major release commit"
26
30
required : true
27
- default : ' breaking:'
31
+ default : " breaking:"
28
32
skip-prerelease :
29
- description : ' Skip prerelease part of the version. When true, release-branch and dev-branch are effectively ignored'
33
+ description : " Skip prerelease part of the version. When true, release-branch and dev-branch are effectively ignored"
30
34
required : true
31
- default : ' false'
35
+ default : " false"
32
36
prefix :
33
- description : ' The prefix to use in the version'
37
+ description : " The prefix to use in the version"
34
38
required : false
35
39
log-paths :
36
- description : ' The paths to be used to calculate changes (comma-separated)'
40
+ description : " The paths to be used to calculate changes (comma-separated)"
37
41
required : false
38
42
default : ./
39
43
outputs :
40
44
version :
41
- description : ' The value of the new pre-calculated tag'
45
+ description : " The value of the new pre-calculated tag"
42
46
value : ${{ steps.version.outputs.version }}
43
47
previous-version :
44
- description : ' Contains the value of previous tag, before calculating a new one'
48
+ description : " Contains the value of previous tag, before calculating a new one"
45
49
value : ${{ steps.previous-version.outputs.previous-version }}
46
50
runs :
47
51
using : " composite"
@@ -54,14 +58,14 @@ runs:
54
58
else
55
59
download_url="https://github.com/codacy/git-version/releases/download/${{ inputs.tool-version }}/git-version"
56
60
fi
57
- curl -Ls "$download_url" > /usr/local/bin/ git-version
58
- chmod +x /usr/local/bin/ git-version
61
+ curl -Ls "$download_url" > "$TOOL_INSTALLATION_PATH/ git-version"
62
+ chmod +x "${{ inputs.tool-installation-path }}/ git-version"
59
63
- id : previous-version
60
64
shell : bash
61
65
run : |
62
66
set -eo pipefail
63
67
64
- export PREVIOUS_VERSION=$(git-version \
68
+ export PREVIOUS_VERSION=$(${{ inputs.tool-installation-path }}/ git-version \
65
69
--previous-version \
66
70
--release-branch "${{ inputs.release-branch }}" \
67
71
--dev-branch "${{ inputs.dev-branch }}" \
77
81
run : |
78
82
set -eo pipefail
79
83
80
- export VERSION=$(git-version \
84
+ export VERSION=$(${{ inputs.tool-installation-path }}/ git-version \
81
85
--release-branch "${{ inputs.release-branch }}" \
82
86
--dev-branch "${{ inputs.dev-branch }}" \
83
87
--minor-identifier="${{ inputs.minor-identifier }}" \
0 commit comments