From c6736cd01d875a9af86114721fe1f82810f3f421 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieli=C5=84ski?= Date: Wed, 12 Feb 2025 17:59:01 +0100 Subject: [PATCH] WIP: Build & Release --- .github/workflows/buildScripts/replaceTokens.js | 3 +++ 1 file changed, 3 insertions(+) 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'); } }); }