File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 66 NPM_TOKEN :
77 description : ' npm token'
88 required : true
9+ GIT_TOKEN :
10+ description : ' github personal token'
11+ required : true
912
1013 inputs :
1114 checkTest :
4851 uses : actions/checkout@v3
4952 with :
5053 path : main_repo
51- persist-credentials : false
54+ token : ${{ secrets.GIT_TOKEN }}
5255
5356 # Setup Node.js environment
5457 - name : Setup Node.js
Original file line number Diff line number Diff line change @@ -88,12 +88,16 @@ jobs:
8888
8989### 配置方式
9090
91- - 创建 Token
91+ - 创建 NPM Token
9292 - NPM Registry 需创建 Automation Token,参见[ 文档] ( https://docs.npmjs.com/creating-and-viewing-access-tokens )
9393 - GitHub Package 无需创建,默认支持
9494
95+ - 创建 GitHub Token
96+ - 因为生成的 CHANGELOG.md 和 package.json 需回写 GitHub,而默认的 ` GITHUB_TOKEN ` 没有该权限
97+ - 因此需要创建一个新的 Token,参见[ 文档] ( https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token )
98+
9599- 配置 Token
96- - 在项目或组织维度配置 ` NPM_TOKEN ` 这个 ` secrets `
100+ - 在项目或组织维度配置 2 个 ` secrets ` : ` NPM_TOKEN ` 和 ` GIT_TOKEN `
97101 - 参见[ 文档] ( https://docs.github.com/en/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces )
98102
99103- 创建 ` .github/workflows/release.yml ` :
You can’t perform that action at this time.
0 commit comments