Add GitHub release asset upload to xtask release#1870
Conversation
There was a problem hiding this comment.
💡 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".
| 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)?; | ||
|
|
There was a problem hiding this comment.
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 👍 / 👎.
Summary
cargo xtask releaseso release artifacts are pushed to GitHubTesting
https://chatgpt.com/codex/tasks/task_e_6905f4213dd48323b706f6f513a0d630