Skip to content

Conversation

@GuillaumeLagrange
Copy link
Contributor

@GuillaumeLagrange GuillaumeLagrange commented Jan 6, 2026

Testing showed that

gh release create v1.0.1 --draft
gh release edit v1.0.1 --draft=false

will automatically mark the release as latest
this is also true if we explicitly do gh release edit v1.0.1 --draft=false --latest=false

We have two issues here

  1. Cargo dist does not allow customizing the release command, Allow customizing the release_command axodotdev/cargo-dist#2244
  2. We need to use gh api in order to prevent gh release edit trying to me too smart for its own good.

The release is then marked as latest as part of the post-announce workflow if we have released a non pre release runner version.

Tested here: https://github.com/CodSpeedHQ/runner/actions/runs/20745672268/job/59562574430#step:10:8
The alpha release is cleaned up already, but I can do further testing if necessary

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR overrides cargo-dist's default release command to prevent GitHub from automatically marking releases as "latest" when they are undrafted. The change works around a cargo-dist limitation by manually editing the generated CI workflow to use the GitHub API directly instead of gh release edit, which cannot properly suppress the automatic "latest" marking.

Key Changes:

  • Added allow-dirty = ["ci"] configuration to dist-workspace.toml to allow manual edits to generated CI files
  • Replaced gh release edit command with direct GitHub API calls to control the "latest" flag behavior

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
dist-workspace.toml Adds allow-dirty configuration with documentation explaining the need for manual CI edits due to cargo-dist limitations
.github/workflows/release.yml Replaces the gh release edit command with GitHub API calls to set draft=false without marking as latest

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 6, 2026

CodSpeed Performance Report

Merging #186 will not alter performance

Comparing cod-1930-any-non-betaalpha-release-in-the-runner-repo-is-marked-as (8bb51c1) with main (fdaea6c)

Summary

✅ 4 untouched

…latest

`gh release edit` behavior marks the release as latest even with
`gh release edit --latest=false --draft=false`

Doing this via `gh api` results in the desired behavior. The release
will be marked as latest by the post-announce custom job if necessary.
@GuillaumeLagrange GuillaumeLagrange force-pushed the cod-1930-any-non-betaalpha-release-in-the-runner-repo-is-marked-as branch from a4ca8a9 to 8bb51c1 Compare January 6, 2026 10:55
@GuillaumeLagrange GuillaumeLagrange merged commit 8bb51c1 into main Jan 6, 2026
12 checks passed
@GuillaumeLagrange GuillaumeLagrange deleted the cod-1930-any-non-betaalpha-release-in-the-runner-repo-is-marked-as branch January 6, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants