diff --git a/packages/actions/src/releasePackages/generateReleaseTree.ts b/packages/actions/src/releasePackages/generateReleaseTree.ts index c02ad86c6abd..38d0650c2170 100644 --- a/packages/actions/src/releasePackages/generateReleaseTree.ts +++ b/packages/actions/src/releasePackages/generateReleaseTree.ts @@ -29,6 +29,7 @@ async function getReleaseEntries() { const releaseEntries: ReleaseEntry[] = []; const packageList: pnpmTree[] = await $`pnpm list --recursive --only-projects --filter {packages/\*} --prod --json`.json(); + for (const pkg of packageList) { // Don't release private packages ever (npm will error anyways) if (pkg.private) continue; diff --git a/packages/actions/src/releasePackages/releasePackage.ts b/packages/actions/src/releasePackages/releasePackage.ts index 185bb0f1c855..6111fd52f044 100644 --- a/packages/actions/src/releasePackages/releasePackage.ts +++ b/packages/actions/src/releasePackages/releasePackage.ts @@ -20,12 +20,14 @@ 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.`); return; } await $`git push --tags`; + try { await octokit?.rest.repos.createRelease({ ...context.repo,