mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Migrate to oxfmt (#618)
* Migrate to oxfmt * Enable import sorting * trailingComma always
This commit is contained in:
+2
-2
@@ -1,6 +1,6 @@
|
||||
import { exec } from "@actions/exec";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { exec } from "@actions/exec";
|
||||
import pkgJson from "../package.json" with { type: "json" };
|
||||
|
||||
process.chdir(path.join(import.meta.dirname, ".."));
|
||||
@@ -13,6 +13,6 @@ const readmePath = path.join(import.meta.dirname, "..", "README.md");
|
||||
const content = fs.readFileSync(readmePath, "utf8");
|
||||
const updatedContent = content.replace(
|
||||
/changesets\/action@[^\s]+/g,
|
||||
`changesets/action@${releaseLine}`
|
||||
`changesets/action@${releaseLine}`,
|
||||
);
|
||||
fs.writeFileSync(readmePath, updatedContent);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { exec } from "@actions/exec";
|
||||
import path from "node:path";
|
||||
|
||||
import { exec } from "@actions/exec";
|
||||
import pkgJson from "../package.json" with { type: "json" };
|
||||
|
||||
const tag = `v${pkgJson.version}`;
|
||||
|
||||
+3
-4
@@ -1,6 +1,5 @@
|
||||
import { exec, getExecOutput } from "@actions/exec";
|
||||
import path from "node:path";
|
||||
|
||||
import { exec, getExecOutput } from "@actions/exec";
|
||||
import pkgJson from "../package.json" with { type: "json" };
|
||||
|
||||
const tag = `v${pkgJson.version}`;
|
||||
@@ -14,11 +13,11 @@ process.chdir(path.join(import.meta.dirname, ".."));
|
||||
["ls-remote", "--exit-code", "origin", "--tags", `refs/tags/${tag}`],
|
||||
{
|
||||
ignoreReturnCode: true,
|
||||
}
|
||||
},
|
||||
);
|
||||
if (exitCode === 0) {
|
||||
console.log(
|
||||
`Action is not being published because version ${tag} is already published`
|
||||
`Action is not being published because version ${tag} is already published`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user