Skip to content

Add GitHub release asset upload to xtask release#1870

Merged
oferchen merged 1 commit into
masterfrom
fix-release-flow-for-package-upload
Nov 1, 2025
Merged

Add GitHub release asset upload to xtask release#1870
oferchen merged 1 commit into
masterfrom
fix-release-flow-for-package-upload

Conversation

@oferchen
Copy link
Copy Markdown
Owner

@oferchen oferchen commented Nov 1, 2025

Summary

  • add an upload step to cargo xtask release so release artifacts are pushed to GitHub
  • gather the generated deb, rpm, and tarball outputs with configurable repository/tag overrides
  • cover the new release upload helpers with unit tests and provide a skip flag for optional execution

Testing

  • cargo fmt
  • cargo test -p xtask

https://chatgpt.com/codex/tasks/task_e_6905f4213dd48323b706f6f513a0d630

@oferchen oferchen merged commit 2e334fc into master Nov 1, 2025
@oferchen oferchen deleted the fix-release-flow-for-package-upload branch November 1, 2025 12:02
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +77 to +83
fn gather_release_artifacts(workspace: &Path) -> TaskResult<Vec<PathBuf>> {
let mut artifacts = Vec::new();

collect_tarballs(workspace, &mut artifacts)?;
collect_debian_packages(workspace, &mut artifacts)?;
collect_rpm_packages(workspace, &mut artifacts)?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restrict upload to artifacts for the current release tag

The gather_release_artifacts helper walks target/dist, target/debian, and the RPM tree and uploads every *.tar.gz, *.deb, and *.rpm it finds. Those directories are not cleaned between runs, so after releasing a previous version the workspace will still contain older tarballs and packages. Running cargo xtask release for a new tag will therefore try to upload all historical artifacts to the new GitHub release, potentially clobbering or publishing stale packages. The upload step should filter the collected paths to the version being released (or clean the output directories beforehand) to avoid mixing assets from different versions.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant