diff --git a/.github/workflows/buildScripts/replaceTokens.js b/.github/workflows/buildScripts/replaceTokens.js index 9872bcb..8b4cd1d 100644 --- a/.github/workflows/buildScripts/replaceTokens.js +++ b/.github/workflows/buildScripts/replaceTokens.js @@ -24,6 +24,9 @@ module.exports = async ({ github, context, core, jobId }) => { core.setFailed(`Token ${token} not found`); return false; } + // replace all occurrences of the ${token} with the value in file + const result = data.replace(new RegExp(`#{${token}}`, 'g'), value); + require('fs').writeFileSync(file, result, 'utf8'); } }); }