aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/publish.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts/src/publish.ts')
-rw-r--r--packages/monorepo-scripts/src/publish.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index 854a72b86..e0602a74f 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -14,6 +14,7 @@ import { constants } from './constants';
import { Package, PackageToNextVersion, VersionChangelog } from './types';
import { changelogUtils } from './utils/changelog_utils';
import { configs } from './utils/configs';
+import { alertDiscordAsync } from './utils/discord';
import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils';
import { publishReleaseNotesAsync } from './utils/github_release_utils';
import { utils } from './utils/utils';
@@ -84,7 +85,16 @@ async function confirmAsync(message: string): Promise<void> {
await generateAndUploadDocJsonsAsync(packagesWithDocs, isStaging, shouldUploadDocs);
}
const isDryRun = configs.IS_LOCAL_PUBLISH;
- await publishReleaseNotesAsync(updatedPublicPackages, isDryRun);
+ const releaseNotes = await publishReleaseNotesAsync(updatedPublicPackages, isDryRun);
+ utils.log('Published release notes');
+
+ if (!isDryRun && releaseNotes) {
+ try {
+ await alertDiscordAsync(releaseNotes);
+ } catch (e) {
+ utils.log("Publish successful, but couldn't auto-alert discord (", e.message, '), Please alert manually.');
+ }
+ }
})().catch(err => {
utils.log(err);
process.exit(1);