Skip to content

Release marked as 'latest' despite make_latest: false in v2.5.0 #703

@EronWright

Description

@EronWright

Description

In v2.5.0, make_latest: false is not honored. The release is still marked as "latest" despite explicitly setting make_latest: false.

Root Cause

PR #692 introduced a new flow where releases are created as drafts first, then published after artifacts are uploaded. However, the finalizeRelease function in src/github.ts does not pass make_latest when updating the release:

async finalizeRelease(params: { owner: string; repo: string; release_id: number }) {
  return await this.github.rest.repos.updateRelease({
    owner: params.owner,
    repo: params.repo,
    release_id: params.release_id,
    draft: false,  // make_latest is not passed here
  });
}

When make_latest is omitted from the updateRelease call, GitHub's API defaults to determining "latest" based on semver comparison, ignoring the original make_latest: false setting from when the draft was created.

Steps to Reproduce

  1. Use softprops/action-gh-release@v2 (resolves to v2.5.0)
  2. Set make_latest: false in the workflow
  3. Create a release for a version that would be considered "latest" by semver
  4. Observe that the release is marked as "latest" despite the setting

Expected Behavior

The release should NOT be marked as "latest" when make_latest: false is specified.

Actual Behavior

The release IS marked as "latest" because make_latest is not passed during the finalizeRelease call.

Suggested Fix

Pass make_latest to the updateRelease call in finalizeRelease:

async finalizeRelease(params: { owner: string; repo: string; release_id: number; make_latest?: string }) {
  return await this.github.rest.repos.updateRelease({
    owner: params.owner,
    repo: params.repo,
    release_id: params.release_id,
    draft: false,
    make_latest: params.make_latest,
  });
}

Workaround

Pin to v2.4.2: uses: softprops/[email protected]

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions