mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Migrate to ESM (#484)
* Migrate to ESM * just use `require.resolve` * reuse setup action * checkout PR head for a sec * ls things * try a thing * the dirname had a trailing whitespace, lol
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { exec } from "@actions/exec";
|
||||
import path from "node:path";
|
||||
|
||||
import pkgJson from "../package.json" with { type: "json" };
|
||||
|
||||
const tag = `v${pkgJson.version}`;
|
||||
const releaseLine = "pr-release";
|
||||
|
||||
process.chdir(path.join(__dirname, ".."));
|
||||
|
||||
await exec("git", ["checkout", "--detach"]);
|
||||
await exec("git", ["add", "--force", "dist"]);
|
||||
await exec("git", ["commit", "-m", tag]);
|
||||
|
||||
await exec("git", [
|
||||
"push",
|
||||
"--force",
|
||||
"origin",
|
||||
`HEAD:refs/heads/${releaseLine}`,
|
||||
]);
|
||||
Reference in New Issue
Block a user