Something went wrong. Try again.
Starship Simulator Controls thoriumsim.com
Something went wrong. Try again.
574 B · 16 lines
TypeScript
at develop
1234567891011121314151617import { appendFile } from "node:fs/promises";import path from "node:path";
try { const pkgjsonPath = path.join(process.cwd(), "./package.json"); const pkgJson = await import(pkgjsonPath, { with: { type: "json" } });
console.info("package.json path:", pkgjsonPath); console.info("package.json version:", pkgJson.version); // Write to GITHUB_OUTPUT environment file const outputFile = process.env.GITHUB_OUTPUT!; await appendFile(outputFile, `version=${pkgJson.version}\n`);} catch (error) { console.error("Error processing version:", error); process.exit(1);}