Skip to content

Commit

Permalink
fix(release): set make_latest legacy during github release creation
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry committed Dec 4, 2024
1 parent bba941a commit ca870e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/nx/src/command-line/release/utils/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ interface GithubRequestConfig {
token: string | null;
}

// https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release--parameters
interface GithubRelease {
id?: string;
tag_name: string;
Expand All @@ -37,6 +38,7 @@ interface GithubRelease {
body?: string;
draft?: boolean;
prerelease?: boolean;
make_latest?: 'legacy' | boolean;
}

export interface GithubRepoData {
Expand Down Expand Up @@ -310,6 +312,8 @@ async function syncGithubRelease(
name: release.version,
body: release.body,
prerelease: release.prerelease,
// legacy specifies that the latest release should be determined based on the release creation date and higher semantic version.
make_latest: 'legacy',
};

try {
Expand Down

0 comments on commit ca870e1

Please sign in to comment.