Skip to content

Commit

Permalink
build: fix release job (#332)
Browse files Browse the repository at this point in the history
  • Loading branch information
giladgd authored Sep 23, 2024
1 parent fc0fca5 commit 97b0d86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ jobs:
GH_RELEASE_REF: ${{ github.ref }}
run: |
echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > ~/.npmrc
export DRY_RUN_RESULT="$(cat ./semanticReleaseDryRunReleaseResult.json)"
export DRY_RUN_RESULT_FILE_PATH="$(pwd)/semanticReleaseDryRunReleaseResult.json"
npx semantic-release
- name: Set npm package url to GITHUB_OUTPUT
Expand Down
7 changes: 5 additions & 2 deletions .releaserc.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {createRequire} from "module";
import fs from "fs-extra";
import {getBinariesGithubRelease} from "./dist/bindings/utils/binariesGithubRelease.js";
import {cliBinName, defaultLlamaCppGitHubRepo} from "./dist/config.js";

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

function getDryRunResult() {
try {
const dryRunResultEnvVarValue = process.env.DRY_RUN_RESULT;
const dryRunResultEnvVarValue = process.env.DRY_RUN_RESULT_FILE_PATH;
if (dryRunResultEnvVarValue == null)
return null;

const res: SemanticReleaseDryRunResult = JSON.parse(dryRunResultEnvVarValue);
const dryRunResultValue = fs.readFileSync(dryRunResultEnvVarValue, "utf8");

const res: SemanticReleaseDryRunResult = JSON.parse(dryRunResultValue);
if (res === false)
return null;

Expand Down

0 comments on commit 97b0d86

Please sign in to comment.