You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-24Lines changed: 52 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,41 +14,69 @@ This sets many environment variables to the various forms of the version for you
14
14
15
15
## Inputs
16
16
17
-
### path
17
+
All inputs are optional.
18
+
19
+
|Name|Default|Description
20
+
|--|--|--|
21
+
`path`|Repo root|The path to the directory for which the version should be determined. This should be at or below the directory containing the version.json file.
22
+
`setCommonVars`|false|Defines a few common version variables as environment variables, with a "Git" prefix (e.g. GitBuildVersion, GitBuildVersionSimple, GitAssemblyInformationalVersion). Adds the `--common-vars` switch to the `nbgv cloud` command.
23
+
`setAllVars`|false|Defines ALL version variables as environment variables, with a "NBGV_" prefix. Adds the `--all-vars` switch to the `nbgv cloud` command.
24
+
`toolVersion`|latest stable|The version of the nbgv dotnet CLI tool to install and use. If not specified, the default is the latest stable version.
25
+
26
+
## Outputs
27
+
28
+
Name | Description
29
+
--|--
30
+
CloudBuildNumber|The cloud build number
31
+
VersionFileFound|A boolean value indicating whether a version.json file was found.
32
+
AssemblyVersion|The version to be used as the .NET assembly version.
33
+
AssemblyFileVersion|The version to be used as the .NET assembly file version.
34
+
AssemblyInformationalVersion|The version to be used as the .NET assembly informational version.
35
+
PublicRelease|A boolean value indicating whether this build is recognized as building from a public release branch.
36
+
PrereleaseVersion|The prerelease/unstable suffix to the version, including the hyphen.
37
+
PrereleaseVersionNoLeadingHyphen|The prerelease/unstable suffix to the version, without the leading hyphen.
38
+
SimpleVersion|The first 3 integers of the version.
39
+
BuildNumber|The build number (i.e. the third integer or PATCH) for this version.
40
+
VersionRevision|The fourth integer component of the version.
41
+
MajorMinorVersion|The "major.minor" portion of the version.
42
+
VersionMajor|The first integer of the version.
43
+
VersionMinor|The second integer of the version.
44
+
GitCommitId|The full SHA1 hash of the HEAD commit.
45
+
GitCommitIdShort|A truncated SHA1 hash of the HEAD commit (usually 10 characters)
46
+
GitCommitDate|The date of the git commit at HEAD
47
+
VersionHeight|The number of commits in the longest single path between the specified commit and the most distant ancestor (inclusive) that set the version to the value at HEAD.
48
+
VersionHeightOffset|The offset to add to VersionHeight when calculating the BuildNumber or wherever else the VersionHeight is used.
49
+
Version|The four integer version.
50
+
BuildMetadataFragment|The +metadata portion of the version, if any.
51
+
NuGetPackageVersion|The version to be used for NuGet packages.
52
+
ChocolateyPackageVersion|The version to be used for Chocolatey packages.
53
+
NpmPackageVersion|The version to be used for NPM packages.
54
+
SemVer1|The SemVer 1.0 compliant version.
55
+
SemVer2|The SemVer 2.0 compliant version.
18
56
19
-
**Optional** The path to the directory for which the version should be determined. This should be at or below the directory containing the version.json file. Default is repo root directory.
20
-
21
-
### commonVars
22
-
23
-
**Optional** Defines a few common version variables as cloud build variables, with a "Git" prefix (e.g. GitBuildVersion, GitBuildVersionSimple, GitAssemblyInformationalVersion).
24
-
25
-
Adds the `--common-vars` switch to the `nbgv cloud` command.
26
-
27
-
Default value is `true`.
28
-
29
-
### allVars
30
-
31
-
**Optional** Defines ALL version variables as cloud build variables, with a "NBGV_" prefix.
32
-
33
-
Adds the `--all-vars` switch to the `nbgv cloud` command.
34
-
35
-
Default value is `true`.
57
+
## Example usage
36
58
37
-
### toolVersion
59
+
### Using step outputs
38
60
39
-
**Optional** The version of the nbgv dotnet CLI tool to install and use. If not specified, the default is the latest stable version.
Copy file name to clipboardExpand all lines: action.yml
+60-6Lines changed: 60 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -9,17 +9,71 @@ inputs:
9
9
description: The path to the directory for which the version should be determined. This should be at or below the directory containing the version.json file. Default is repo root directory.
10
10
required: false
11
11
default: '.'
12
-
allVars:
13
-
description: Defines ALL version variables as cloud build variables, with a "NBGV_" prefix.
12
+
setAllVars:
13
+
description: Defines ALL version variables as environment variables, with a "NBGV_" prefix.
14
14
required: false
15
-
default: 'true'
16
-
commonVars:
17
-
description: Defines a few common version variables as cloud build variables, with a "Git" prefix (e.g. GitBuildVersion, GitBuildVersionSimple, GitAssemblyInformationalVersion).
15
+
default: false
16
+
setCommonVars:
17
+
description: Defines a few common version variables as environment variables, with a "Git" prefix (e.g. GitBuildVersion, GitBuildVersionSimple, GitAssemblyInformationalVersion).
18
18
required: false
19
-
default: 'true'
19
+
default: false
20
20
toolVersion:
21
21
description: The version of the nbgv dotnet CLI tool to install and use. If not specified, the default is the latest stable version.
22
22
required: false
23
+
outputs:
24
+
CloudBuildNumber:
25
+
description: The cloud build number
26
+
VersionFileFound:
27
+
description: A boolean value indicating whether a version.json file was found.
28
+
AssemblyVersion:
29
+
description: The version to be used as the .NET assembly version.
30
+
AssemblyFileVersion:
31
+
description: The version to be used as the .NET assembly file version.
32
+
AssemblyInformationalVersion:
33
+
description: The version to be used as the .NET assembly informational version.
34
+
PublicRelease:
35
+
description: A boolean value indicating whether this build is recognized as building from a public release branch.
36
+
PrereleaseVersion:
37
+
description: The prerelease/unstable suffix to the version, including the hyphen.
38
+
PrereleaseVersionNoLeadingHyphen:
39
+
description: The prerelease/unstable suffix to the version, without the leading hyphen.
40
+
SimpleVersion:
41
+
description: The first 3 integers of the version.
42
+
BuildNumber:
43
+
description: The build number (i.e. the third integer or PATCH) for this version.
44
+
VersionRevision:
45
+
description: The fourth integer component of the version.
46
+
MajorMinorVersion:
47
+
description: The "major.minor" portion of the version.
48
+
VersionMajor:
49
+
description: The first integer of the version.
50
+
VersionMinor:
51
+
description: The second integer of the version.
52
+
GitCommitId:
53
+
description: The full SHA1 hash of the HEAD commit.
54
+
GitCommitIdShort:
55
+
description: A truncated SHA1 hash of the HEAD commit (usually 10 characters)
56
+
GitCommitDate:
57
+
description: The date of the git commit at HEAD
58
+
VersionHeight:
59
+
description: The number of commits in the longest single path between the specified commit and the most distant ancestor (inclusive) that set the version to the value at HEAD.
60
+
VersionHeightOffset:
61
+
description: The offset to add to VersionHeight when calculating the BuildNumber or wherever else the VersionHeight is used.
62
+
Version:
63
+
description: The four integer version.
64
+
BuildMetadataFragment:
65
+
description: The +metadata portion of the version, if any.
66
+
NuGetPackageVersion:
67
+
description: The version to be used for NuGet packages.
68
+
ChocolateyPackageVersion:
69
+
description: The version to be used for Chocolatey packages.
70
+
NpmPackageVersion:
71
+
description: The version to be used for NPM packages.
0 commit comments