mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
ci(create-release): use github app token
This commit is contained in:
12
.github/actions/bump-package-version.js
vendored
12
.github/actions/bump-package-version.js
vendored
@@ -1,10 +1,6 @@
|
||||
const fs = require('fs');
|
||||
const packageJson = await Bun.file('./package/package.json').json();
|
||||
|
||||
const version = process.env.TGT_RELEASE_VERSION;
|
||||
const newVersion = version.replace('v', '');
|
||||
const newVersion = process.env.TGT_RELEASE_VERSION;
|
||||
packageJson.version = newVersion.replace('v', '');
|
||||
|
||||
const packageFile = fs.readFileSync('package/package.json', { encoding: 'utf8' });
|
||||
|
||||
const newFileContent = packageFile.replace(/"version":\s+"(.*)",$/gm, `"version": "${newVersion}",`);
|
||||
|
||||
fs.writeFileSync('package/package.json', newFileContent);
|
||||
await Bun.write('./package/package.json', JSON.stringify(packageJson, null, 2));
|
||||
|
||||
Reference in New Issue
Block a user