Add release-pr workflow (#490)

* Add `release-pr` workflow

* Add comments

* fix quotes
This commit is contained in:
Mateusz Burzyński
2025-05-15 09:42:54 +02:00
committed by GitHub
parent e82f42c2cc
commit f6369c112a
3 changed files with 126 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
const path = require("path");
const { exec, getExecOutput } = require("@actions/exec");
const { version } = require("../package.json");
const tag = `v${version}`;
const releaseLine = "pr-release";
process.chdir(path.join(__dirname, ".."));
(async () => {
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}`,
]);
})();