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}',