From 253b5d63d5c19836dda2150bb0779869e02406d9 Mon Sep 17 00:00:00 2001 From: "Gilad S." <7817232+giladgd@users.noreply.github.com> Date: Wed, 18 Sep 2024 21:32:42 +0300 Subject: [PATCH] build: fix release bug (#316) --- .github/workflows/build.yml | 4 +++- package-lock.json | 2 ++ package.json | 1 + .../patches/@semantic-release+npm+12.0.1.patch | 15 +++++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 scripts/patches/@semantic-release+npm+12.0.1.patch diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0bfce82..1cb3c338 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -318,7 +318,9 @@ jobs: name: llama.cpp path: llama - name: Apply fix patch on semantic-release, to not check for push permission on dry run - run: git apply --ignore-whitespace ./scripts/patches/semantic-release+24.1.1.patch + run: | + git apply --ignore-whitespace ./scripts/patches/semantic-release+24.1.1.patch + git apply --ignore-whitespace ./scripts/patches/@semantic-release+npm+12.0.1.patch - name: Resolve next release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package-lock.json b/package-lock.json index bed04cab..d63babac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,6 +53,7 @@ "@nolebase/vitepress-plugin-og-image": "^2.5.0", "@resvg/resvg-js": "^2.6.2", "@semantic-release/exec": "^6.0.3", + "@semantic-release/npm": "12.0.1", "@shikijs/vitepress-twoslash": "^1.17.7", "@types/async-retry": "^1.4.8", "@types/bytes": "^3.1.4", @@ -3658,6 +3659,7 @@ "resolved": "https://registry.npmjs.org/@semantic-release/npm/-/npm-12.0.1.tgz", "integrity": "sha512-/6nntGSUGK2aTOI0rHPwY3ZjgY9FkXmEHbW9Kr+62NVOsyqpKKeP0lrCH+tphv+EsNdJNmqqwijTEnVWUMQ2Nw==", "dev": true, + "license": "MIT", "dependencies": { "@semantic-release/error": "^4.0.0", "aggregate-error": "^5.0.0", diff --git a/package.json b/package.json index 2e89981d..3021d5ca 100644 --- a/package.json +++ b/package.json @@ -131,6 +131,7 @@ "@nolebase/vitepress-plugin-og-image": "^2.5.0", "@resvg/resvg-js": "^2.6.2", "@semantic-release/exec": "^6.0.3", + "@semantic-release/npm": "12.0.1", "@shikijs/vitepress-twoslash": "^1.17.7", "@types/async-retry": "^1.4.8", "@types/bytes": "^3.1.4", diff --git a/scripts/patches/@semantic-release+npm+12.0.1.patch b/scripts/patches/@semantic-release+npm+12.0.1.patch new file mode 100644 index 00000000..b0ddb13b --- /dev/null +++ b/scripts/patches/@semantic-release+npm+12.0.1.patch @@ -0,0 +1,15 @@ +diff --git a/node_modules/@semantic-release/npm/lib/verify-auth.js b/node_modules/@semantic-release/npm/lib/verify-auth.js +index 99e138e..31dee5f 100644 +--- a/node_modules/@semantic-release/npm/lib/verify-auth.js ++++ b/node_modules/@semantic-release/npm/lib/verify-auth.js +@@ -12,6 +12,10 @@ export default async function (npmrc, pkg, context) { + stdout, + stderr, + } = context; ++ ++ if (context.options?.dryRun) ++ return; ++ + const registry = getRegistry(pkg, context); + + await setNpmrcAuth(npmrc, registry, context);