diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 84a977cc..692c6e83 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -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 diff --git a/scripts/showVersion.ts b/scripts/showVersion.ts new file mode 100644 index 00000000..3495ff42 --- /dev/null +++ b/scripts/showVersion.ts @@ -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);