File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -25,13 +25,15 @@ This action was inspired by [latest-tag](https://github.com/EndBug/latest-tag) a
25
25
26
26
You should use this action in a workflow immediately after checkout. The following outputs will be set:
27
27
28
- - ` version ` : version from package.json
29
- - ` tags ` : reverse sorted git tags in semver format
30
- - ` nextVersion ` : calculated next version (see table above)
28
+ - ` version ` - version from package.json
29
+ - ` tags ` - reverse sorted git tags in semver format
30
+ - ` nextVersion ` - calculated next version (see table above)
31
+ - ` nextTag ` - calculated next version, prefixed (see below)
32
+ - ` isPrerelease ` - true if pre-release, false otherwise.
31
33
32
34
For inputs, the following options are available:
33
35
34
- - ` versionPrefix ` : adds a string to the tag .
36
+ - ` tagPrefix ` - adds a string to the ` nextTag ` (default: '') .
35
37
36
38
Example yml:
37
39
Original file line number Diff line number Diff line change @@ -91,8 +91,10 @@ async function run(): Promise<void> {
91
91
console . log ( `tags: ${ tags } ` ) ;
92
92
93
93
const nextVersion = getNextVersion ( version , tags ) ;
94
- const prefix = core . getInput ( 'versionPrefix' ) || '' ;
95
- core . setOutput ( 'nextVersion' , prefix + nextVersion ) ;
94
+ const tagPrefix = core . getInput ( 'tagPrefix' ) || '' ;
95
+ core . setOutput ( 'nextVersion' , nextVersion ) ;
96
+ core . setOutput ( 'nextTag' , tagPrefix + nextVersion ) ;
97
+ core . setOutput ( 'isPrerelease' , isPreRelease ( new SemVer ( nextVersion ) ) ) ;
96
98
console . log ( `nextVersion: ${ nextVersion } ` ) ;
97
99
} catch ( error ) {
98
100
core . setFailed ( error . message ) ;
You can’t perform that action at this time.
0 commit comments