diff --git a/dev-infra/ng-dev.js b/dev-infra/ng-dev.js index 9c7081da26..2df105d26e 100755 --- a/dev-infra/ng-dev.js +++ b/dev-infra/ng-dev.js @@ -5918,12 +5918,12 @@ class ReleaseAction { * Creates a Github release for the specified version in the configured project. * The release is created by tagging the specified commit SHA. */ - _createGithubReleaseForVersion(newVersion, versionBumpCommitSha) { + _createGithubReleaseForVersion(newVersion, versionBumpCommitSha, prerelease) { return tslib.__awaiter(this, void 0, void 0, function* () { const tagName = newVersion.format(); yield this.git.github.git.createRef(Object.assign(Object.assign({}, this.git.remoteParams), { ref: `refs/tags/${tagName}`, sha: versionBumpCommitSha })); info(green(` ✓ Tagged v${newVersion} release upstream.`)); - yield this.git.github.repos.createRelease(Object.assign(Object.assign({}, this.git.remoteParams), { name: `v${newVersion}`, tag_name: tagName })); + yield this.git.github.repos.createRelease(Object.assign(Object.assign({}, this.git.remoteParams), { name: `v${newVersion}`, tag_name: tagName, prerelease })); info(green(` ✓ Created v${newVersion} release in Github.`)); }); } @@ -5955,7 +5955,7 @@ class ReleaseAction { // Verify the packages built are the correct version. yield this._verifyPackageVersions(newVersion, builtPackages); // Create a Github release for the new version. - yield this._createGithubReleaseForVersion(newVersion, versionBumpCommitSha); + yield this._createGithubReleaseForVersion(newVersion, versionBumpCommitSha, npmDistTag === 'next'); // Walk through all built packages and publish them to NPM. for (const builtPackage of builtPackages) { yield this._publishBuiltPackageToNpm(builtPackage, npmDistTag); diff --git a/dev-infra/release/publish/actions.ts b/dev-infra/release/publish/actions.ts index 56c77b4f25..af50f41a11 100644 --- a/dev-infra/release/publish/actions.ts +++ b/dev-infra/release/publish/actions.ts @@ -472,7 +472,7 @@ export abstract class ReleaseAction { * The release is created by tagging the specified commit SHA. */ private async _createGithubReleaseForVersion( - newVersion: semver.SemVer, versionBumpCommitSha: string) { + newVersion: semver.SemVer, versionBumpCommitSha: string, prerelease: boolean) { const tagName = newVersion.format(); await this.git.github.git.createRef({ ...this.git.remoteParams, @@ -485,6 +485,8 @@ export abstract class ReleaseAction { ...this.git.remoteParams, name: `v${newVersion}`, tag_name: tagName, + prerelease, + }); info(green(` ✓ Created v${newVersion} release in Github.`)); } @@ -522,7 +524,8 @@ export abstract class ReleaseAction { await this._verifyPackageVersions(newVersion, builtPackages); // Create a Github release for the new version. - await this._createGithubReleaseForVersion(newVersion, versionBumpCommitSha); + await this._createGithubReleaseForVersion( + newVersion, versionBumpCommitSha, npmDistTag === 'next'); // Walk through all built packages and publish them to NPM. for (const builtPackage of builtPackages) {