Skip to content

Commit 7e072c2

Browse files
Better npm publish config #5
1 parent 6bcaec7 commit 7e072c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/publish-npm.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { execSync } from "node:child_process";
22
import { mkdtempSync, readFileSync, writeFileSync } from "node:fs";
33
import { tmpdir } from "node:os";
44
import { join } from "node:path";
5+
import { resolve } from "node:path";
56

67
const ref = process.env.GITHUB_REF || "";
78
const sha = process.env.GITHUB_SHA || "";
@@ -148,7 +149,8 @@ const publishPackage = ({ path, name }, shouldPublish) => {
148149
writePackageJson(path, pkgJson);
149150
try {
150151
const tgzName = run("npm pack --quiet", { cwd: path, env: npmEnv });
151-
const tgzPath = join(path, tgzName);
152+
const tgzPath = resolve(join(path, tgzName));
153+
console.log(`Packed tarball: ${tgzPath}`);
152154
const publishCwd = mkdtempSync(join(tmpdir(), "rescript-mui-publish-"));
153155
execSync(`npm publish ${tgzPath} --access public --tag ${distTag}`, {
154156
cwd: publishCwd,

0 commit comments

Comments
 (0)