Skip to content

fix(ci): version workflow triggers on dev with v4 prefix - #709

Merged
namastex888 merged 1 commit into
mainfrom
fix/version-workflow-v4
Mar 23, 2026
Merged

namastex888 merged 1 commit into
mainfrom
fix/version-workflow-v4

Conversation

@namastex888

@namastex888 namastex888 commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add dev to workflow_run branches so CI completions on dev trigger auto-versioning
  • Fix hardcoded v3 → v4 prefix in the Derive version step
  • Dev pushes trigger without requiring "Merge pull request" in commit message
  • All versioning still targets dev branch and publishes to npm as @next

Why this must target main: GitHub evaluates workflow_run triggers using the workflow file from the default branch. The fix on dev has no effect until main has it too.

Test plan

  • Only changes .github/workflows/version.yml — no code changes
  • After merge, push to dev → CI passes → Version workflow triggers → v4.YYMMDD.N tag created

Summary by CodeRabbit

  • Chores
    • Build workflow now triggers on both main and dev branches with enhanced skip-ci support
    • Release versioning updated from v3 to v4 format

- Add dev to workflow_run branches so CI on dev triggers versioning
- Fix v3 → v4 prefix in Derive version step
- Dev pushes trigger without requiring merge commit message
- All versioning still targets dev branch and publishes as @next
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Mar 23, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6ab6b056-7fc9-429f-bd22-9e9dfb58cc49

📥 Commits

Reviewing files that changed from the base of the PR and between 7e0f238 and 14f77ea.

📒 Files selected for processing (1)
  • .github/workflows/version.yml

📝 Walkthrough

Walkthrough

Updated GitHub Actions workflow trigger to execute on both main and dev branches. Refined job-level conditional logic to support branch-specific execution paths while maintaining skip-CI behavior. Incremented version scheme from v3 to v4 in tag search and version derivation logic.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/version.yml
Extended workflow_run trigger to fire on main and dev branches. Restructured job conditional to permit execution on dev branch independently or on main with /dev in PR message (both excluding [skip ci] commits). Updated version format from v3.{YYMMDD}.{build_number} to v4.{YYMMDD}.{build_number}, including git tag search prefix.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/version-workflow-v4

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@namastex888
namastex888 merged commit 4935254 into main Mar 23, 2026
5 of 6 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14f77eabc5

ℹ️ 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".

Comment on lines +58 to +60
EXISTING=$(git tag --list "v4.${TODAY}.*" | wc -l)
BUILD_NUMBER=$((EXISTING + 1))
VERSION="3.${TODAY}.${BUILD_NUMBER}"
VERSION="4.${TODAY}.${BUILD_NUMBER}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep derived tag major in sync with published package version

This change derives 4.YYMMDD.N in the workflow, but bun run version still generates 3.YYMMDD.N from scripts/version.ts (see git tag --list "v3..." and return 3.${datePrefix}.${n}``), and that script is what updates package.json before publish. In runs on `dev`, this will create `v4.` tags while publishing `3.` package versions, and subsequent same-day runs can attempt to publish an unchanged npm version while continuing to mint new tags.

Useful? React with 👍 / 👎.

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