From cb8b3876c072fdb1c5953ac0e863d142aafd61e7 Mon Sep 17 00:00:00 2001 From: Jasery Date: Wed, 29 Oct 2025 11:06:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E9=85=8D=E7=BD=AE=EF=BC=8C=E4=BC=98=E5=85=88?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20GITHUB=5FTOKEN=20=E4=BB=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81=20GitHub=20Actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 4 ++-- buildAssets/builder/config.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index e63ef5a..ef7a67c 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,6 @@ # GitHub Personal Access Token for private repository access # Required for auto-updates from private repositories -GH_TOKEN= +GH_TOKEN=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 # For private repositories, you might also need: -# GITHUB_TOKEN= # Alternative token name that some tools might use \ No newline at end of file +# GITHUB_TOKEN= # Alternative token name that some tools might use diff --git a/buildAssets/builder/config.js b/buildAssets/builder/config.js index 3d0dbb7..7f38cb8 100644 --- a/buildAssets/builder/config.js +++ b/buildAssets/builder/config.js @@ -16,7 +16,7 @@ const baseConfig = { owner: 'Jasery', repo: 'gdt-tool', releaseType: 'release', - token: process.env.GH_TOKEN || '' // 可选:从环境变量获取 GitHub Token,私有仓库必需 + token: process.env.GITHUB_TOKEN || process.env.GH_TOKEN || '' // 优先使用 GITHUB_TOKEN(GitHub Actions 自动提供) } ], artifactName: '${productName} ${version}_${arch}.${ext}',