File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,19 @@ SEMVER validator
1111## Example usage
1212
1313``` yaml
14- uses : actions/semver-validation-action@master
14+ uses : actions/semver-validation-action@0.0.5
1515with :
1616 version : ${{ github.event.release.tag_name }}
1717` ` `
1818
1919` ` ` yaml
20- uses : actions/semver-validation-action@master
20+ uses : actions/semver-validation-action@0.0.5
21+ with :
22+ version : ' v0.7.9'
23+ ` ` `
24+
25+ ` ` ` yaml
26+ uses : actions/semver-validation-action@0.0.5
2127with :
2228 version : ' 0.7.9-beta.1'
2329` ` `
Original file line number Diff line number Diff line change 66 const version = core . getInput ( 'version' ) ;
77 console . log ( `Checking version: ${ version } !` ) ;
88
9- var re = new RegExp ( "[0 -9]+\.[0 -9]+\.[0 -9]+ (-(0|[1-9]\d*|(beta|alpha). *))?$" ) ;
9+ var re = new RegExp ( "(0|[1 -9]\d*)\.(0|[1 -9]\d*)\.(0|[1 -9]\d*) (-(([a-z-][\da-z-]+|[\da-z-]+[a-z-][\da-z-]*| 0|[1-9]\d*)(\.([a-z-][\da-z-]+|[\da-z-]+[a-z-][\da-z-]*|0|[1-9]\d*))*))?(\\+([\da-z-]+(\.[\da-z-]+) *))?$" ) ;
1010 if ( re . exec ( version ) == null ) {
1111 core . setFailed ( "Invalid version" ) ;
1212 }
You can’t perform that action at this time.
0 commit comments