chore(actions): get right version

This commit is contained in:
lisonge
2023-11-05 19:08:52 +08:00
parent cfd052ade9
commit b6da338373
2 changed files with 7 additions and 1 deletions

6
scripts/showVersion.ts Normal file
View File

@@ -0,0 +1,6 @@
import fs from 'node:fs/promises';
import type PkgT from '../package.json';
const pkg: typeof PkgT = JSON.parse(
await fs.readFile(process.cwd() + '/package.json', 'utf-8'),
);
process.stdout.write(pkg.version);