@@ -16,8 +16,8 @@ interface BuildInfo {
16
16
optLevel : string ;
17
17
}
18
18
19
- const BINARYEN_VERSION = '117 ' ;
20
- const WABT_VERSION = '1.0.35 ' ;
19
+ const BINARYEN_VERSION = '118 ' ;
20
+ const WABT_VERSION = '1.0.36 ' ;
21
21
22
22
function getRoot ( ) : string {
23
23
return process . env . GITHUB_WORKSPACE ! ;
@@ -39,18 +39,12 @@ function detectVersionAndProject() {
39
39
core . info ( `Detected tag ${ tag } ` ) ;
40
40
TAG = tag ;
41
41
42
- // project-v1.0.0
43
- if ( tag . includes ( '-' ) ) {
44
- [ project , version ] = tag . split ( '-' , 2 ) ;
45
- }
46
-
47
- // project@v 1.0.0
48
- else if ( tag . includes ( '@' ) ) {
49
- [ project , version ] = tag . split ( '@' , 2 ) ;
50
- }
42
+ const regex = / ^ (?: (?< project > [ \w - ] + ) [ @ - ] ) ? (?< version > v ? \d + \. \d + \. \d + ) (?< suffix > [ \w + . - ] + ) ? $ / i;
43
+ const match = tag . match ( regex ) ;
51
44
52
- // v1.0.0
53
- else {
45
+ if ( match ?. groups ) {
46
+ ( { project = '' , version = '' } = match . groups ) ;
47
+ } else {
54
48
version = tag ;
55
49
}
56
50
@@ -241,8 +235,8 @@ async function buildPackages(builds: BuildInfo[]) {
241
235
await fs . promises . writeFile ( checksumFile , checksumHash ) ;
242
236
243
237
core . info ( `Built ${ build . packageName } ` ) ;
244
- core . info ( `\tPlugin file: ${ checksumFile } ` ) ;
245
- core . info ( `\tChecksum file: ${ outputFile } ` ) ;
238
+ core . info ( `\tPlugin file: ${ outputFile } ` ) ;
239
+ core . info ( `\tChecksum file: ${ checksumFile } ` ) ;
246
240
core . info ( `\tChecksum: ${ checksumHash } ` ) ;
247
241
}
248
242
0 commit comments