Skip to content

ci: add workflow_dispatch to squad-mark-released.yml - #128

Merged
mpaulosky merged 29 commits into
devfrom
squad/128-workflow-dispatch-mark-released
Apr 24, 2026
Merged

ci: add workflow_dispatch to squad-mark-released.yml#128
mpaulosky merged 29 commits into
devfrom
squad/128-workflow-dispatch-mark-released

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

Adds workflow_dispatch trigger to squad-mark-released.yml so the Done → Released project board migration can be run manually.

Problem

When v1.2.0 was published, squad-mark-released.yml did not fire — likely because the release event and workflow landing on main had a timing race. With no manual trigger, the only recovery path was direct GraphQL mutations.

Changes

  • Add workflow_dispatch: {} trigger
  • Update job if condition to always run on manual dispatch (skip the pre-release/draft guard for workflow_dispatch events)
  • Use context.payload.release?.tag_name ?? 'manual dispatch' to prevent null-ref in the summary notice

Testing

After merge to devmain, the workflow will appear under Actions → Squad Mark Released → Run workflow for manual recovery use.


⚠️ This PR should be fast-tracked to main so dev and main stay in sync.

mpaulosky and others added 29 commits April 20, 2026 08:03
- PR #62: APPROVE — pre-push hook logic verified, clean infra fix
- PR #63: conditional APPROVE — build confirmation needed before merge
- PR #60: NEEDS_CHANGES — dirty state, missing copyright headers, wrong attribution
- Systemic finding: squad-test.yml does not trigger on sprint/** PRs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add push trigger for sprint/** so direct pushes to sprint branches
  trigger the parallel test suite
- Add sprint/** to pull_request.branches so PRs targeting sprint
  consolidation branches also run CI validation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update .NET SDK to 10.0.202 in global.json
- Add docs/build-log.txt with build & test results
- Include refactored code improvements

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…learnings

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
GitVersion auto-increments on main; v1.0.0-sprint3 is final sprint tag.
Subsequent releases follow pure semantic versioning from v1.0.1 onwards.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Marks cutover from sprint-based tags to pure semantic versioning.

GitVersion auto-increments Patch on main.
This release validates the new versioning workflow:
- main commit → CI GitVersion tags → GitHub Release creation

Closes: versioning decision from sprint/4-planning

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When CI runs on main after merge, create and push the git tag based on
GitVersion-determined semver. This enables v1.0.1, v1.0.2, etc. to be
automatically tagged without manual intervention.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add step to CI workflow that creates and pushes git tags for each commit
to main, using GitVersion-determined semver.

This completes the v1.0.1 release flow:
- Merge PR to main
- CI determines version with GitVersion
- CI creates and pushes tag (v1.0.1, v1.0.2, ...)
- Team creates GitHub Release from tag

Closes: versioning automation setup
GitVersion v4 action no longer accepts 'useConfigFile'. Use 'configFilePath'
to explicitly specify the GitVersion.yml location.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace deprecated 'useConfigFile' with 'configFilePath' in GitVersion
action.

This is required for gittools/actions/gitversion/execute@v4 to work
properly.
The 'Create and Push Git Tag' step requires 'contents: write' permission
to push tags to the repository.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Change 'contents: read' to 'contents: write' so the 'Create and Push Git
Tag' step can push tags.

This completes the automatic versioning workflow.
semVer includes pre-release height on non-main branches, resulting in tags like
v1.0.0-101. On main, we want clean semver tags like v1.0.1, which comes from
the majorMinorPatch output.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
GitVersion's semVer output includes pre-release height (e.g.
v1.0.0-101).
On main, we want clean v1.0.1 format, which comes from majorMinorPatch.

This ensures the first post-sprint release is tagged v1.0.1, not
v1.0.0-{height}.
Document the new automatic versioning workflow with GitVersion.
This is the first commit after v1.0.0, which will trigger v1.0.1 tag creation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add RELEASE.md documenting the new automatic versioning workflow.

This commit on main will trigger v1.0.1 tag creation via the CI
workflow.
Aligns with squad naming conventions and PRD specification.
All squad-managed workflows use the 'squad-' prefix.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align CI workflow naming with squad conventions. All squad-managed
workflows use the 'squad-' prefix.
Merge dev into main for Sprint 4 release. Resolve workflow conflicts
by accepting dev versions (squad-ci.yml, squad-test.yml).
Also fix squad-preview validate to exclude AppHost.Tests/Bunit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
## Sprint 4 Release — v1.1.0

Replaces PR #105 which had a merge conflict in workflow files
(`squad-ci.yml`, `squad-test.yml`).

### Changes included

All Sprint 4 work from `dev`:
- feat: Blazor theme system (Sprint 4 issues #81#86)
- feat: VSA migration — move Domain.Features to Web (PR #104)
- fix: Resolve all 7 flaky E2E tests in AppHost.Tests (PR #102)
- refactor: Reorganize test projects (PR #100)
- ci: Central Package Management (CPM)
- ci: Fix squad-preview validate to skip AppHost.Tests/Bunit (unrunnable
on plain runners)

### Conflict resolution

`squad-ci.yml` and `squad-test.yml` had add/add and content conflicts
from main having an older version. Resolved by accepting the `dev`
versions (correct current state).

---
Closes #105

_After merging, run **squad-milestone-release** to tag and publish
v1.1.0._
## Sprint 5 Release — Redis & Caching (v1.2.0)

Promotes `dev` → `main` for the Sprint 5 release.

### What's in this release

- **`IBlogPostCacheService`** — caching contract with
`GetOrFetchAllAsync`, `GetOrFetchByIdAsync`, `InvalidateAllAsync`,
`InvalidateByIdAsync`
- **`BlogPostCacheService`** — two-tier L1 (IMemoryCache, 1-min TTL) +
L2 (Redis, 5-min TTL), registered as Singleton via
`AddBlogPostCaching()`
- All 4 BlogPost MediatR handlers refactored to inject
`IBlogPostCacheService` only
- 16 unit tests, 2 arch tests, 3 Redis integration tests
(Testcontainers)
- ADR: `docs/adr/sprint5-caching-abstraction.md`
- CI: auto-move Done → Released on GitHub Release publish

### Closed issues
Closes #109, #110, #111, #112, #113, #114

### CI status
All checks green on `dev` ✅
Fixes literal block scalar indentation in project-board-automation.yml, add-issues-to-project.yml, and squad-test.yml. All CI checks green.
Allows manual triggering of the Done → Released project board migration
in case the release event fires before the workflow is on main, or for
recovery scenarios.

- Add workflow_dispatch trigger
- Guard job if-condition to skip pre-release/draft check on manual runs
- Use optional chaining for tag_name to avoid null ref on manual runs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 24, 2026 16:44
@github-actions github-actions Bot added the squad Squad triage inbox — Lead will assign to a member label Apr 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🏗️ PR Added to Squad Triage Queue

This PR has been labeled with squad and added to the triage queue.

Next steps:

  • The squad Lead will review and assign to an appropriate team member
  • A squad:member label will be added after triage

If you know which squad member should handle this, you can add the appropriate squad:member label yourself.

Copilot AI 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.

Pull request overview

Adds a manual trigger to the “Squad Mark Released” GitHub Actions workflow so the “Done → Released” Project board migration can be run on-demand when the release event doesn’t fire as expected.

Changes:

  • Add workflow_dispatch trigger to allow manual runs from the Actions UI.
  • Adjust job-level if to run unconditionally for manual dispatch while still skipping draft/prerelease releases.
  • Prevent null/undefined access in the final notice by using optional chaining with a fallback tag label.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results Summary

206 tests  ±0   206 ✅ ±0   14s ⏱️ ±0s
  5 suites ±0     0 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit fdf3256. ± Comparison against base commit 6352f91.

@codecov

codecov Bot commented Apr 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.93%. Comparing base (6352f91) to head (fdf3256).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #128   +/-   ##
=======================================
  Coverage   76.93%   76.93%           
=======================================
  Files          43       43           
  Lines         672      672           
  Branches      111      111           
=======================================
  Hits          517      517           
  Misses        105      105           
  Partials       50       50           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mpaulosky mpaulosky left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Aragorn's Review — ✅ APPROVED

CI: 17/17 checks green. Copilot review: positive, no issues raised.

Diff Analysis

workflow_dispatch: {} — Correct YAML syntax for a manual trigger with no inputs. Clean and idiomatic.

Updated if condition:

if: ${{ github.event_name == 'workflow_dispatch' || (!github.event.release.prerelease && !github.event.release.draft) }}

Logic is sound across all paths:

  • Manual dispatch → short-circuits true, job always runs ✅
  • Real release event → false || (true && true) → runs ✅
  • Pre-release event → false || (false && true) → skips ✅
  • Draft release event → false || (true && false) → skips ✅

context.payload.release?.tag_name ?? 'manual dispatch' — Safe. Optional chaining guards against the release payload being absent on workflow_dispatch, and the nullish coalescing fallback is descriptive. No risk of a runtime error here.

Verdict

Minimal, correct recovery mechanism. Three lines changed, all correct. Squash-merging to dev. 🗡️

@mpaulosky
mpaulosky merged commit 566c642 into dev Apr 24, 2026
21 checks passed
@mpaulosky
mpaulosky deleted the squad/128-workflow-dispatch-mark-released branch April 24, 2026 16:50
mpaulosky added a commit that referenced this pull request Apr 24, 2026
## Summary

Promotes `dev` → `main` to bring the `workflow_dispatch` trigger for
`squad-mark-released.yml` to production.

## What's included

- **ci: add workflow_dispatch to squad-mark-released.yml** (PR #128,
squash-merged)
- Adds manual trigger so Done → Released board migration can be run from
Actions UI
  - Guards `if` condition for manual vs release-event runs
  - Safe `tag_name` fallback for manual dispatch

## Why

`squad-mark-released.yml` never fired for v1.2.0 due to a timing race at
release. Without `workflow_dispatch`, recovery required direct GraphQL
mutations. This fix makes the workflow self-service going forward.

Closes no issue — maintenance/ops improvement.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Boromir <boromir@squad.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

squad Squad triage inbox — Lead will assign to a member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants