WIP: Build & Release
This commit is contained in:
@@ -17,14 +17,11 @@ module.exports = async ({ github, context, core, jobId }) => {
|
||||
let match;
|
||||
while (match = regex.exec(data)) {
|
||||
const token = match[1].replace(/-/g, '_').toUpperCase();
|
||||
console.log(token);
|
||||
const value = getValue(token, jobId);
|
||||
console.log(value);
|
||||
if (!value) {
|
||||
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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user