File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1- const fs = require ( 'fs' ) ;
2- const path = require ( 'path' ) ;
1+ const fs = require ( 'node: fs' ) ;
2+ const path = require ( 'node: path' ) ;
33
44function bumpActionVersion ( ) {
55 const packageJsonPath = path . join ( __dirname , '../../' , 'package.json' ) ;
@@ -9,7 +9,10 @@ function bumpActionVersion() {
99 const outputPath = path . join ( __dirname , '../../' , 'action.yml' ) ;
1010
1111 const templateContent = fs . readFileSync ( templatePath , 'utf8' ) ;
12- const updatedContent = templateContent . replace ( / \$ { v e r s i o n } / g, packageJsonVersion ) ;
12+ const updatedContent = templateContent . replaceAll (
13+ '${ version }' ,
14+ packageJsonVersion
15+ ) ;
1316
1417 fs . writeFileSync ( outputPath , updatedContent , 'utf8' ) ;
1518 console . log ( `Updated action.yml with version ${ packageJsonVersion } ` ) ;
You can’t perform that action at this time.
0 commit comments