-
Notifications
You must be signed in to change notification settings - Fork 147
Bugfix | Github Workflow | Support release from ui #147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe release workflow is enhanced with a release-existence check that conditionally creates a new release or attaches artifacts to an existing one based on whether a release for the current tag already exists. Changes
Estimated code review effortπ― 2 (Simple) | β±οΈ ~10 minutes Suggested reviewers
Poem
π₯ Pre-merge checks | β 1 | β 2β Failed checks (1 warning, 1 inconclusive)
β Passed checks (1 passed)
βοΈ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
π§Ή Nitpick comments (2)
.github/workflows/release.yml (2)
164-173: Quote the tag name variable for shell safety.While tag names typically don't contain special characters, quoting
${{ github.ref_name }}is a defensive shell scripting practice that prevents potential issues with unexpected characters.Suggested fix
- name: Check if release exists id: check_release run: | - if gh release view ${{ github.ref_name }} >/dev/null 2>&1; then + if gh release view "${{ github.ref_name }}" >/dev/null 2>&1; then echo "exists=true" >> $GITHUB_OUTPUT else echo "exists=false" >> $GITHUB_OUTPUT fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
191-201: Explicitly setoverwrite_filesfor clarity.The attach step correctly runs when the release exists. Note that
softprops/action-gh-release@v2defaults tooverwrite_files: true, meaning re-runs for the same tag will overwrite existing assets. Consider addingoverwrite_files: trueexplicitly in thewithblock to document this behavior clearly, or set it tofalseif you want to preserve existing assets.
π Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
π Files selected for processing (1)
.github/workflows/release.yml
β° Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: codestyle
π Additional comments (1)
.github/workflows/release.yml (1)
175-189: LGTM!The conditional logic correctly gates release creation on the non-existence check.
Description
Motivation and Context
Type of Change
Changes Made
Screenshots/Examples (if applicable)
Checklist
uv run black .to format my codeuv run flake8 .and fixed all issuesuv run mypy --config-file .mypy.ini .and addressed type checking issuesuv run bandit -c .bandit.yaml -r .for security checksuv run pytestand all tests passTesting
Test Configuration:
Test Steps:
1.
2.
3.
Additional Notes
Related Issues/PRs