mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
ci(release): use app user (#11038)
* ci(release): set git user * ci(release): refactor to use app * ci(release): use only app token --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -18,20 +18,19 @@ async function checkRegistry(release: ReleaseEntry) {
|
||||
|
||||
async function gitTagAndRelease(release: ReleaseEntry, dry: boolean) {
|
||||
const tagName = `${release.name === 'discord.js' ? `` : `${release.name}@`}${release.version}`;
|
||||
// Don't throw, if this exits non-zero it's probably because the tag already exists
|
||||
await $`git tag ${tagName}`.nothrow();
|
||||
|
||||
if (dry) {
|
||||
info(`[DRY] Tag "${tagName}" created, skipping push and release creation.`);
|
||||
info(`[DRY] Release would be "${tagName}", skipping release creation.`);
|
||||
return;
|
||||
}
|
||||
|
||||
await $`git push origin ${tagName}`;
|
||||
const commitHash = (await $`git rev-parse --short HEAD`.text()).trim();
|
||||
|
||||
try {
|
||||
await octokit?.rest.repos.createRelease({
|
||||
...context.repo,
|
||||
tag_name: tagName,
|
||||
target_commitish: commitHash,
|
||||
name: tagName,
|
||||
body: release.changelog ?? '',
|
||||
generate_release_notes: release.changelog === undefined,
|
||||
|
||||
Reference in New Issue
Block a user