Skip to content

Commit bfd1222

Browse files
authored
chore(ci): update release process (#153)
* chore(ci): use different gh token and disable commit * chore: add condition to skip commits
1 parent a61e25d commit bfd1222

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/process-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,5 @@ jobs:
2525
- run: yarn workspace scripts processRelease
2626
env:
2727
EVENT_NUMBER: ${{ github.event.issue.number }}
28-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
GITHUB_TOKEN: ${{ secrets.TOKEN_RELEASE_BOT }}
29+
RELEASE_TEST: ${{ secrets.RELEASE_TEST }}

scripts/release/process-release.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,14 @@ new Set([...Object.keys(versionsToRelease), ...langsToUpdateRepo]).forEach(
109109
);
110110

111111
// commit openapitools and changelogs
112-
run('git config user.name "api-clients-bot"');
113-
run('git config user.email "[email protected]"');
114-
run('git add openapitools.json');
115-
run('git add doc/changelogs/*');
116-
execa.sync('git', ['commit', '-m', TEXT.commitMessage]);
117-
run(`git push origin ${MAIN_BRANCH}`);
112+
if (process.env.RELEASE_TEST !== 'true') {
113+
run('git config user.name "api-clients-bot"');
114+
run('git config user.email "[email protected]"');
115+
run('git add openapitools.json');
116+
run('git add doc/changelogs/*');
117+
execa.sync('git', ['commit', '-m', TEXT.commitMessage]);
118+
run(`git push origin ${MAIN_BRANCH}`);
119+
}
118120

119121
// generate clients to release
120122
Object.keys(versionsToRelease).forEach((lang) => {

0 commit comments

Comments
 (0)