From 819f76afbf19800948bf05f76ebea3d38ac14370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Wed, 4 Mar 2026 21:38:32 +0800 Subject: [PATCH] Use gh CLI to clone hash repo in workflow In the release workflow, replace the token-based git clone URL with the GitHub CLI command. Removed the CLONE_URL variable and now run `gh repo clone NapNeko/napcat-release-hash hash-repo`, avoiding embedding GH_TOKEN in the clone URL and relying on gh authentication for a cleaner, more secure clone. --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf40e7ce5..143245f86 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -485,9 +485,8 @@ jobs: set -euo pipefail VERSION="${GITHUB_REF#refs/tags/}" HASH_REPO="NapNeko/napcat-release-hash" - CLONE_URL="https://x-access-token:${GH_TOKEN}@github.com/${HASH_REPO}.git" - git clone "$CLONE_URL" hash-repo + gh repo clone "$HASH_REPO" hash-repo node .github/scripts/publish-release-hash.mjs \ --version "$VERSION" \