From 693ebb52b4c2a05f7fbeef0785a322900ca0f45e Mon Sep 17 00:00:00 2001 From: ZN-Ice Date: Thu, 4 Jun 2026 22:00:43 +0800 Subject: [PATCH] fix(ci): npm publish uses HTTPS and sets version from tag - Configure git to use HTTPS instead of SSH (avoids permission denied in CI) - Set package version from git tag before publishing Co-Authored-By: Claude Opus 4.7 --- .github/workflows/release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24fb9ef..2dab2f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -170,6 +170,16 @@ jobs: run: | echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc + # Configure git to use HTTPS instead of SSH (avoids permission denied errors in CI) + git config --global url."https://github.com/".insteadOf "ssh://git@github.com/" + git config --global url."https://github.com/".insteadOf "git@github.com:" + + # Set version from git tag + VERSION="${GITHUB_REF_NAME#v}" + npm version "$VERSION" --no-git-tag-version -w packages/cli-box-darwin-arm64 + npm version "$VERSION" --no-git-tag-version -w packages/cli-box-electron-darwin-arm64 + npm version "$VERSION" --no-git-tag-version -w packages/cli-box-skill + npm publish packages/cli-box-darwin-arm64 --access public npm publish packages/cli-box-electron-darwin-arm64 --access public npm publish packages/cli-box-skill --access public