WIP: Build & Release
This commit is contained in:
@@ -16,13 +16,14 @@ module.exports = async ({ github, context, core, jobId }) => {
|
||||
const regex = /#{(.*?)}/g;
|
||||
let match;
|
||||
while (match = regex.exec(data)) {
|
||||
const original = match[0];
|
||||
const token = match[1].replace(/-/g, '_').toUpperCase();
|
||||
const value = getValue(token, jobId);
|
||||
if (!value) {
|
||||
core.setFailed(`Token ${token} not found`);
|
||||
return false;
|
||||
}
|
||||
const result = data.replace(new RegExp(`#{${token}}`, 'g'), value);
|
||||
const result = data.replace(new RegExp(`#{${original}}`, 'g'), value);
|
||||
require('fs').writeFileSync(file, result, 'utf8');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user