Skip to content

Commit eb36d88

Browse files
authored
don't make pre-release 'latest' (#583)
1 parent e0905b8 commit eb36d88

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/targets/upm.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { reportError } from '../utils/errors';
1818
import { extractZipArchive } from '../utils/system';
1919
import { withTempDir } from '../utils/files';
2020
import { isDryRun } from '../utils/helpers';
21+
import { isPreviewRelease } from '../utils/version';
2122
import { NoneArtifactProvider } from '../artifact_providers/none';
2223

2324
/** Name of the artifact that contains the UPM package */
@@ -143,12 +144,14 @@ export class UpmTarget extends BaseTarget {
143144
} else {
144145
await git.push(['origin', 'main']);
145146
const changes = await this.githubTarget.getChangelog(version);
147+
const isPrerelease = isPreviewRelease(version);
146148
const draftRelease = await this.githubTarget.createDraftRelease(
147149
version,
148150
targetRevision,
149151
changes
150152
);
151-
await this.githubTarget.publishRelease(draftRelease);
153+
await this.githubTarget.publishRelease(draftRelease,
154+
{ makeLatest: !isPrerelease });
152155
}
153156
},
154157
true,

0 commit comments

Comments
 (0)