mirror of
https://gitea.redwind.top/Austin/subscription
synced 2024-11-16 20:15:25 +08:00
chore(actions): get right version
This commit is contained in:
parent
cfd052ade9
commit
b6da338373
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);
|
Loading…
Reference in New Issue
Block a user