mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Add release-pr workflow (#490)
* Add `release-pr` workflow * Add comments * fix quotes
This commit is contained in:
@@ -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}`,
|
||||
]);
|
||||
})();
|
||||
Reference in New Issue
Block a user