Skip to content

Commit 4e5077d

Browse files
refactor change in github-action/lib/bump-action-version.js
1 parent 4136b41 commit 4e5077d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

github-action/lib/bump-action-version.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const fs = require('fs');
2-
const path = require('path');
1+
const fs = require('node:fs');
2+
const path = require('node:path');
33

44
function 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(/\${ version }/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}`);

0 commit comments

Comments
 (0)