Skip to content

Commit 97b0d86

Browse files
authored
build: fix release job (#332)
1 parent fc0fca5 commit 97b0d86

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ jobs:
502502
GH_RELEASE_REF: ${{ github.ref }}
503503
run: |
504504
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > ~/.npmrc
505-
export DRY_RUN_RESULT="$(cat ./semanticReleaseDryRunReleaseResult.json)"
505+
export DRY_RUN_RESULT_FILE_PATH="$(pwd)/semanticReleaseDryRunReleaseResult.json"
506506
507507
npx semantic-release
508508
- name: Set npm package url to GITHUB_OUTPUT

.releaserc.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {createRequire} from "module";
2+
import fs from "fs-extra";
23
import {getBinariesGithubRelease} from "./dist/bindings/utils/binariesGithubRelease.js";
34
import {cliBinName, defaultLlamaCppGitHubRepo} from "./dist/config.js";
45

@@ -65,11 +66,13 @@ const config: Omit<GlobalConfig, "repositoryUrl" | "tagFormat"> = {
6566

6667
function getDryRunResult() {
6768
try {
68-
const dryRunResultEnvVarValue = process.env.DRY_RUN_RESULT;
69+
const dryRunResultEnvVarValue = process.env.DRY_RUN_RESULT_FILE_PATH;
6970
if (dryRunResultEnvVarValue == null)
7071
return null;
7172

72-
const res: SemanticReleaseDryRunResult = JSON.parse(dryRunResultEnvVarValue);
73+
const dryRunResultValue = fs.readFileSync(dryRunResultEnvVarValue, "utf8");
74+
75+
const res: SemanticReleaseDryRunResult = JSON.parse(dryRunResultValue);
7376
if (res === false)
7477
return null;
7578

0 commit comments

Comments
 (0)