Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 20, 2025

This PR extends the release workflow to automatically upload wheels to GitHub release artifacts and improves the release UX by auto-creating release drafts, addressing both the backup solution requested in #742 and the workflow enhancement requested in #622.

Changes Made

1. Created Shared Wheel Download Script

Added ci/tools/download-wheels that encapsulates the wheel downloading logic previously inline in release.yml. The script:

  • Supports both individual components (cuda-core, cuda-bindings, etc.) and "all" components
  • Maintains the same filtering logic to exclude cython test artifacts (*-tests patterns)
  • Provides proper error handling and argument validation

2. Extended release-upload.yml Workflow

Enhanced the existing release upload workflow to optionally download and upload wheels:

  • Added optional run-id and component inputs (maintains backward compatibility)
  • Added conditional step that downloads wheels using the shared script and uploads them to GitHub releases
  • Only executes wheel uploading when both optional inputs are provided

3. Refactored release.yml Workflow

Updated the main release workflow to leverage the new functionality:

  • Modified the upload-archive job call to pass run-id and component parameters for wheel archiving
  • Refactored the publish-wheels job to use the shared script instead of duplicated inline logic

4. Auto-create Release Drafts (Issue #622)

Enhanced the release workflow to improve UX by automatically creating release drafts:

  • If a release draft for a given git tag already exists, proceeds normally (preserves existing behavior)
  • If no release draft exists for the given tag, automatically creates one using gh release create --draft
  • Updated workflow description to reflect the new auto-creation capability

Behavior

  • Existing functionality preserved: Source archive uploading continues to work as before
  • New wheel backup: When releasing, wheels are now automatically uploaded to GitHub release artifacts alongside the source archive
  • Improved UX: No longer requires manually creating release drafts before running the workflow
  • Code reuse: Both workflows share the same tested wheel downloading logic, eliminating duplication
  • PyPI publishing unchanged: The existing PyPI/TestPyPI publishing flow continues to work normally

Testing

The implementation includes comprehensive testing:

  • Script functionality validation with mock GitHub Actions artifacts
  • Integration tests verifying workflow input/output consistency
  • YAML syntax validation and shell script linting
  • Backward compatibility verification

This provides the requested backup solution for publicly released wheels and improved release workflow UX while maintaining all existing functionality and following the principle of minimal, surgical changes.

Fixes #742 and addresses #622.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Aug 20, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Copilot AI and others added 2 commits August 20, 2025 19:01
…tifacts

Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
Copilot AI changed the title [WIP] CI: Upload wheels to release artifacts CI: Upload wheels to release artifacts Aug 20, 2025
Copilot AI requested a review from leofang August 20, 2025 19:08
Copilot finished work on behalf of leofang August 20, 2025 19:08
@leofang
Copy link
Member

leofang commented Aug 20, 2025

@copilot thanks. Now that you're touching the release workflows, could you also take the opportunity to address #622? The logic should be

  • if a release draft for a given git tag already exists, do nothing (status quo)
  • otherwise, create a release draft (new)

Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Aug 20, 2025

@copilot thanks. Now that you're touching the release workflows, could you also take the opportunity to address #622? The logic should be

  • if a release draft for a given git tag already exists, do n...

Implemented auto-creation of release drafts as requested in #622. The release workflow now:

  • Creates a draft release automatically if none exists for the given git tag
  • Preserves existing behavior when a draft already exists
  • Maintains the same validation logic for existing drafts

This improves the UX by eliminating the manual step of creating release drafts before running the workflow. Commit: 509d596

Copilot AI changed the title CI: Upload wheels to release artifacts CI: Upload wheels to release artifacts and auto-create release drafts Aug 20, 2025
Copilot finished work on behalf of leofang August 20, 2025 22:24
@github-project-automation github-project-automation bot moved this from Todo to In Progress in CCCL Aug 21, 2025
Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
Copilot AI requested a review from leofang August 21, 2025 00:47
Copilot finished work on behalf of leofang August 21, 2025 00:47
@leofang leofang added enhancement Any code-related improvements P1 Medium priority - Should do CI/CD CI/CD infrastructure labels Aug 21, 2025
@leofang leofang linked an issue Aug 21, 2025 that may be closed by this pull request
@leofang leofang marked this pull request as ready for review August 21, 2025 00:50
@leofang leofang requested a review from cryos August 21, 2025 00:51
Copy link
Member

@leofang leofang left a comment

Choose a reason for hiding this comment

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

We'll know if this works next time we release!

@github-project-automation github-project-automation bot moved this from In Progress to In Review in CCCL Aug 21, 2025
@leofang leofang merged commit 5fb3fb6 into main Aug 21, 2025
4 checks passed
@leofang leofang deleted the copilot/fix-742 branch August 21, 2025 01:45
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure enhancement Any code-related improvements P1 Medium priority - Should do

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

CI: Upload wheels to release artifacts CI: Auto-create a release draft in the release workflow?

3 participants