fix: set token automatically

This commit is contained in:
Tom Hu 2024-05-23 00:36:53 +07:00
parent a05a16bd04
commit 7289938827
No known key found for this signature in database
GPG key ID: 79155678363963D2
4 changed files with 11 additions and 19 deletions

View file

@ -7,6 +7,10 @@ jobs:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Checkout
uses: actions/checkout@v4.1.6
- name: Install dependencies

12
dist/index.js vendored
View file

@ -32393,9 +32393,7 @@ const buildCommitExec = () => buildExec_awaiter(void 0, void 0, void 0, function
GITHUB_SHA: process.env.GITHUB_SHA,
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
});
if (token) {
commitOptions.env.CODECOV_TOKEN = token;
}
commitOptions.env.CODECOV_TOKEN = token;
if (commitParent) {
commitExecArgs.push('--parent-sha', `${commitParent}`);
}
@ -32462,9 +32460,7 @@ const buildReportExec = () => buildExec_awaiter(void 0, void 0, void 0, function
GITHUB_SHA: process.env.GITHUB_SHA,
GITHUB_HEAD_REF: process.env.GITHUB_HEAD_REF || '',
});
if (token) {
reportOptions.env.CODECOV_TOKEN = token;
}
reportOptions.env.CODECOV_TOKEN = token;
reportExecArgs.push('--git-service', `${gitService}`);
if (overrideCommit) {
reportExecArgs.push('-C', `${overrideCommit}`);
@ -32542,9 +32538,7 @@ const buildUploadExec = () => buildExec_awaiter(void 0, void 0, void 0, function
envVarsArg.push(envVarClean);
}
}
if (token) {
uploadOptions.env.CODECOV_TOKEN = token;
}
uploadOptions.env.CODECOV_TOKEN = token;
if (disableFileFixes) {
uploadExecArgs.push('--disable-file-fixes');
}

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -99,9 +99,7 @@ const buildCommitExec = async (): Promise<{
});
if (token) {
commitOptions.env.CODECOV_TOKEN = token;
}
commitOptions.env.CODECOV_TOKEN = token;
if (commitParent) {
commitExecArgs.push('--parent-sha', `${commitParent}`);
}
@ -188,9 +186,7 @@ const buildReportExec = async (): Promise<{
});
if (token) {
reportOptions.env.CODECOV_TOKEN = token;
}
reportOptions.env.CODECOV_TOKEN = token;
reportExecArgs.push('--git-service', `${gitService}`);
if (overrideCommit) {
@ -285,9 +281,7 @@ const buildUploadExec = async (): Promise<{
envVarsArg.push(envVarClean);
}
}
if (token) {
uploadOptions.env.CODECOV_TOKEN = token;
}
uploadOptions.env.CODECOV_TOKEN = token;
if (disableFileFixes) {
uploadExecArgs.push('--disable-file-fixes');
}