Skip to content

feat: automate rc draft release flow#110

Merged
Keith-CY merged 8 commits intodevelopfrom
feat/rc-create-release-automation
Mar 6, 2026
Merged

feat: automate rc draft release flow#110
Keith-CY merged 8 commits intodevelopfrom
feat/rc-create-release-automation

Conversation

@Keith-CY
Copy link
Copy Markdown
Collaborator

@Keith-CY Keith-CY commented Mar 6, 2026

Summary

  • trigger bump/release automation on remote rc branch creation and later rc branch updates
  • derive release vs prerelease from main/develop ancestry and keep draft releases refreshable without re-bumping version
  • upload final release artifacts to workflow artifacts and document the rc-driven release flow

Verification

  • YAML parse for .github/workflows/bump-version.yml and .github/workflows/release.yml
  • actionlint on .github/workflows/bump-version.yml and .github/workflows/release.yml
  • Full CI / release workflow run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 6, 2026

📊 Test Coverage Report

Metric Base (develop) PR (feat/rc-create-release-automation) Delta
Lines 74.16% (5863/7906) 74.16% (5863/7906) ⚪ ±0.00%
Functions 67.87% (676/996) 67.87% (676/996) ⚪ ±0.00%
Regions 75.40% (9734/12909) 75.40% (9734/12909) ⚪ ±0.00%

Coverage measured by cargo llvm-cov (clawpal-core + clawpal-cli).

Copy link
Copy Markdown
Collaborator

@dev01lay2 dev01lay2 left a comment

Choose a reason for hiding this comment

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

PR #110 — feat: automate rc draft release flow

CI: rust/frontend/coverage/profile-e2e pass ✅; build matrix pending (pre-existing infra).

The rc-branch-driven automation is the right UX direction — cuts out the manual "pick bump type" step and anchors prerelease/release classification in source-branch ancestry rather than version string heuristics. The semver comparison Node.js script is solid. validate_release_state gate in release.yml correctly prevents overwriting published releases while allowing draft refreshes. Idempotent commit step (exit 0 on no-diff) is correct — subsequent steps in the job still run.


🔴 BS — Double-trigger on rc branch creation

on.create and on.push.branches: rc/v* both fire when a new rc branch is pushed. GitHub emits a create event and a push event for the same ref when a branch is created with commits (which is always the case for an rc cut from main/develop). With cancel-in-progress: true, one of the two concurrent runs — non-deterministically — gets killed. The release may silently fail on the very first trigger, with no explicit error surfaced to the user.

Fix (option A — simplest): Drop the create trigger entirely; the push trigger already fires on branch creation. Add a paths-ignore-exempt guard if needed:

on:
  push:
    branches:
      - 'rc/v*'
    paths-ignore:
      - package.json
      - src-tauri/Cargo.toml
      - src-tauri/Cargo.lock
  workflow_dispatch:
    ...

Remove the create block and the if: ${{ github.event_name != 'create' || ... }} guard on prepare (the branch filter already ensures only rc/v* triggers it).

Fix (option B — keep both triggers): Add a job-level guard to skip the push that coincides with a branch creation:

prepare:
  if: >-
    github.event_name == 'workflow_dispatch' ||
    github.event_name == 'create' ||
    (github.event_name == 'push' && !github.event.created)

🟡 NBS ① — cancel-in-progress: true can orphan a release trigger

If a second push lands on the rc branch while commit_push is running (but not yet at the Trigger Release workflow step), the in-flight run gets cancelled after the version commit is pushed but before release.yml is dispatched. This leaves a version bump without a corresponding draft release update, with no notification.

Consider cancel-in-progress: false to let the in-flight run finish, or restructure to dispatch the release trigger in a separate job so the concurrency boundary is tighter.


🟡 NBS ② — Misleading error when main and develop share HEAD

if [ "$MAIN_BASE" = "$DEVELOP_BASE" ]; then
  echo "::error::Could not distinguish whether $REF_NAME was created from main or develop"
  exit 1
fi

The actual cause here is that main and develop have identical HEADs (haven't diverged), making the merge-base tie-break useless. The current message ("could not distinguish") reads as a logic bug rather than a repo state issue. Suggest:

echo "::error::main and develop share the same HEAD commit; ancestry check is ambiguous. Ensure develop has diverged from main before creating an rc branch."

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 6, 2026

📦 PR Build Artifacts

Platform Download Size
Windows-x64 📥 clawpal-Windows-x64 34.4 MB
macOS-ARM64 📥 clawpal-macOS-ARM64 44.9 MB
Linux-x64 📥 clawpal-Linux-x64 187.1 MB
macOS-x64 📥 clawpal-macOS-x64 45.6 MB

🔨 Built from d29b42c · View workflow run
⚠️ Unsigned development builds — for testing only

Copy link
Copy Markdown
Collaborator

@dev01lay2 dev01lay2 left a comment

Choose a reason for hiding this comment

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

Re-review — new commit 0a991c54

CI: all checks pending at review time (new push).

New commit (test: replace token-like literals with synthetic constants in e2e fixture) is a clean, unrelated test hygiene fix — extracting TEST_ANTHROPIC_KEY / TEST_OPENAI_KEY constants and wiring them through build_image(). Good housekeeping, no concerns.

Workflow files unchanged — prior BS still open:

🔴 Double-trigger on rc branch creation (on.create + on.push.branches: rc/v* both fire for the same branch push). Needs one of the two fixes from the previous review before this can merge.

@Keith-CY Keith-CY force-pushed the feat/rc-create-release-automation branch from ab46c6e to 311da28 Compare March 6, 2026 09:40
Copy link
Copy Markdown
Collaborator

@dev01lay2 dev01lay2 left a comment

Choose a reason for hiding this comment

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

Re-review — new commit e56fa9c8

CI: rust check failing; frontend/coverage/profile-e2e pass ✅; build matrix pending.

✅ Prior BS resolved

The double-trigger (on.create + on.push.branches) is gone — the new commit drops the create trigger entirely and uses only the push: branches: rc/v* path. The if: github.event_name != 'create' guard on prepare is also removed, which is correct. Fix (Option A) applied cleanly. 👍

The rest of the workflow refactor looks solid: the package.json / Cargo.toml version consistency check is a good addition, the semver comparison Node.js script is correct, ref_name is properly propagated through needs.prepare.outputs.ref_name in every downstream step, and the idempotent commit path (committed=false, exit 0) is correct.


🔴 BS — cargo fmt --check still failing

src-tauri/src/commands/doctor.rs has formatting violations — rustfmt wants to reformat the classify_connection_quality test assertions and the pick_bottleneck_stage call. Run:

cargo fmt --all
git add -u
git commit -m 'style: cargo fmt'
git push

Same issue as before; same fix.

@Keith-CY Keith-CY merged commit 0ad0279 into develop Mar 6, 2026
9 checks passed
@Keith-CY Keith-CY deleted the feat/rc-create-release-automation branch March 6, 2026 10:39
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.

2 participants