mirror of
https://github.com/AIsouler/GKD_subscription.git
synced 2025-12-18 15:55:29 +08:00
chore(actions): get right version
This commit is contained in:
2
.github/workflows/build_release.yml
vendored
2
.github/workflows/build_release.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
|
||||
- id: version
|
||||
run: |
|
||||
version=$(pnpm show @gkd-kit/subscription version)
|
||||
version=$(pnpm exec tsx ./scripts/showVersion.ts)
|
||||
echo "version=${version}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Git commit
|
||||
|
||||
6
scripts/showVersion.ts
Normal file
6
scripts/showVersion.ts
Normal 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);
|
||||
Reference in New Issue
Block a user