ci: switch release trigger to workflow_dispatch#12
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdded a manual release path ( Changes
Sequence Diagram(s)sequenceDiagram
participant User as User (manual dispatch)
participant GH as GitHub Actions
participant TagAction as Tag Action
participant Repo as Git repository
participant Release as Release job
Note over User,GH: Manual dispatch flow
User->>GH: workflow_dispatch(tag)
GH->>Repo: git rev-parse refs/tags/<tag> (verify exists)
GH->>Release: checkout ref = inputs.tag
Release->>Repo: fetch tag and create release
Note over GH,TagAction: Push-triggered flow
Repo->>GH: push event
GH->>TagAction: run tag action (compute & push tag)
TagAction->>Repo: create & push tag
TagAction->>Release: emit tag output
Release->>Repo: checkout ref = tag output
Release->>Repo: create release
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
AGENTS.md (1)
29-29: Capitalize this bullet to match surrounding guideline style.Nice typo fix. Consider
Avoid using unnecessary emojis.for consistency with the other imperative bullets in this section.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@AGENTS.md` at line 29, The bullet "avoid using unnecessary emojis." should be capitalized to match the other imperative-style bullets; edit AGENTS.md to change that line to "Avoid using unnecessary emojis." so it follows the surrounding guideline style and punctuation..github/workflows/release.yml (1)
61-69: Verify dispatched tag before checkout.Right now checkout can fail before the explicit verification step runs, so the validation is effectively bypassed as a controlled check.
Proposed refactor
- - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ steps.ref.outputs.ref }} - - name: Verify dispatched tag exists if: github.event_name == 'workflow_dispatch' - run: git rev-parse "refs/tags/${{ inputs.tag }}" + env: + RELEASE_TAG: ${{ inputs.tag }} + run: | + git ls-remote --exit-code --tags "https://github.com/${{ github.repository }}.git" "refs/tags/${RELEASE_TAG}" + + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ steps.ref.outputs.ref }}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/release.yml around lines 61 - 69, The workflow currently runs the "Checkout" step before the "Verify dispatched tag exists" check so a missing tag can cause checkout to fail preemptively; reorder the steps so the step named "Verify dispatched tag exists" (the job step that runs git rev-parse "refs/tags/${{ inputs.tag }}" with if: github.event_name == 'workflow_dispatch') executes before the "Checkout" step (uses: actions/checkout@v4) — or alternatively add an explicit pre-check step that performs git rev-parse under the same condition and only then perform the checkout — preserving the existing if condition and step names.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/release.yml:
- Around line 44-49: The release job's if condition currently allows runs on
push because it permits (needs.tag.result == 'success' &&
needs.tag.outputs.new_tag != '') in addition to github.event_name ==
'workflow_dispatch'; update the condition so the job only runs for manual
dispatch. Replace the combined clause under if with a single check for
github.event_name == 'workflow_dispatch' (remove the needs.tag.result and
needs.tag.outputs.new_tag branch) so that only workflow_dispatch triggers the
release job.
---
Nitpick comments:
In @.github/workflows/release.yml:
- Around line 61-69: The workflow currently runs the "Checkout" step before the
"Verify dispatched tag exists" check so a missing tag can cause checkout to fail
preemptively; reorder the steps so the step named "Verify dispatched tag exists"
(the job step that runs git rev-parse "refs/tags/${{ inputs.tag }}" with if:
github.event_name == 'workflow_dispatch') executes before the "Checkout" step
(uses: actions/checkout@v4) — or alternatively add an explicit pre-check step
that performs git rev-parse under the same condition and only then perform the
checkout — preserving the existing if condition and step names.
In `@AGENTS.md`:
- Line 29: The bullet "avoid using unnecessary emojis." should be capitalized to
match the other imperative-style bullets; edit AGENTS.md to change that line to
"Avoid using unnecessary emojis." so it follows the surrounding guideline style
and punctuation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 689b3116-4f6e-4e53-a0f8-e5c8df44f7c4
📒 Files selected for processing (2)
.github/workflows/release.ymlAGENTS.md
af44733 to
c1ec58f
Compare
Summary
Switches the release workflow from a patch-only auto-tagger to Conventional Commits-aware bumps (mathieudutour/github-tag-action).
Related issue
n/a (follow-up to #11)
Checklist
make lintpassesgo test ./...passesSummary by CodeRabbit
Chores
Documentation