提取 github 变量

This commit is contained in:
lutinglt
2025-06-28 19:36:06 +08:00
parent a8bcd45791
commit df6eb8fef8
8 changed files with 103 additions and 71 deletions

View File

@@ -1,8 +1,8 @@
const fs = require('fs');
const path = require('path');
const fs = require("fs");
const path = require("path");
const pkgPath = path.join(__dirname, '..', 'package.json');
const pkgPath = path.join(__dirname, "..", "package.json");
const pkg = JSON.parse(fs.readFileSync(pkgPath));
const version = pkg.version;
console.log(version);
console.log(version);