Skip to content

fix(ci): always tag distribution even when content unchanged#18

Merged
flippyhead merged 1 commit into
mainfrom
fix/publish-tag-always
Apr 20, 2026
Merged

fix(ci): always tag distribution even when content unchanged#18
flippyhead merged 1 commit into
mainfrom
fix/publish-tag-always

Conversation

@flippyhead
Copy link
Copy Markdown
Owner

@flippyhead flippyhead commented Apr 20, 2026

Discovered during Task 21: the publish workflow's no-diff gate was preventing the tag from being created when rc → final releases had byte-identical content. Splits the step into four so tag creation is independent from commit creation.

Follow-up to #16.

🤖 Generated with Claude Code


Note

Low Risk
Low risk workflow refactor that only changes publish/tagging behavior in GitHub Actions. Main risk is accidental extra tag pushes or mismatched commit/tag if the distribution repo state is unexpected.

Overview
Updates the publish-plugin GitHub Actions workflow to decouple tagging from committing when publishing to the distribution repo.

The workflow now commits only when staged content differs (exposing committed=true/false), but it always creates and pushes the distribution tag even if there were no content changes (e.g., RC → final with identical bytes). The final summary output is updated to report whether a commit was made.

Reviewed by Cursor Bugbot for commit e9c6ffe. Bugbot is set up for automated code reviews on this repo. Configure here.

When the source version moves from e.g. v3.0.0-rc.1 to v3.0.0 with no
file changes, the previous workflow short-circuited on the no-diff
branch and skipped the tag. Distribution repo was missing the v3.0.0
tag after Task 21.

Splits the step into four: conditional commit, unconditional tag,
conditional push-commit, unconditional push-tag. The distribution
repo now always gets a matching tag for every source release tag.

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ai-brain Ready Ready Preview, Comment Apr 20, 2026 11:21pm

Request Review

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Always tag distribution on release, even with unchanged content

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Splits publish workflow into four independent steps for reliability
• Tag creation now always executes, regardless of content changes
• Commit and push operations remain conditional on actual changes
• Fixes issue where rc→final releases with identical content skipped tagging
Diagram
flowchart LR
  A["Check for changes"] --> B["Commit if changed"]
  B --> C["Tag always"]
  C --> D["Push commit if changed"]
  D --> E["Push tag always"]
Loading

Grey Divider

File Changes

1. .github/workflows/publish-plugin.yml 🐞 Bug fix +22/-11

Split publish workflow for independent tag creation

• Refactored single "Commit and tag" step into four separate steps
• Made tag creation unconditional while keeping commit conditional
• Changed output variable from changed to committed for clarity
• Updated conditional logic to push tag independently from commit push

.github/workflows/publish-plugin.yml


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented Apr 20, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Advisory comments

1. Misleading summary env name 🐞 Bug ⚙ Maintainability
Description
The Summary step assigns steps.publish.outputs.committed into an env var named CHANGED, which is
inconsistent with the new committed terminology and can mislead future edits or reuse of this env
var.
Code

.github/workflows/publish-plugin.yml[R135-143]

      - name: Summary
        env:
          TAG: ${{ steps.ref.outputs.tag }}
          BRANCH: ${{ steps.distbranch.outputs.branch }}
-          CHANGED: ${{ steps.publish.outputs.changed }}
+          CHANGED: ${{ steps.publish.outputs.committed }}
        run: |
          echo "Source tag: $TAG"
          echo "Distribution: https://github.com/flippyhead/ai-brain-plugin (branch: $BRANCH)"
-          echo "Changed: $CHANGED"
+          echo "Committed: $CHANGED"
Evidence
The workflow renamed the output to committed, but the Summary step still stores it in CHANGED
and then prints "Committed", making the env var name inconsistent with the meaning.

.github/workflows/publish-plugin.yml[135-143]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The Summary step uses an env var named `CHANGED` to hold `steps.publish.outputs.committed`, which is inconsistent with the new output naming and can confuse maintenance.

### Issue Context
The workflow refactor replaced `changed` with `committed` to reflect whether a commit was created.

### Fix Focus Areas
- .github/workflows/publish-plugin.yml[135-143]

### Suggested change
- Rename `CHANGED` env var to `COMMITTED`
- Update the final `echo` to use `$COMMITTED`

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@flippyhead flippyhead merged commit 3965c8e into main Apr 20, 2026
3 checks passed
@flippyhead flippyhead deleted the fix/publish-tag-always branch April 20, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant