Skip to content

feat(ci): auto-move Done → Released on GitHub Release publish - #108

Merged
mpaulosky merged 23 commits into
devfrom
squad/107-mark-released-on-publish
Apr 24, 2026
Merged

feat(ci): auto-move Done → Released on GitHub Release publish#108
mpaulosky merged 23 commits into
devfrom
squad/107-mark-released-on-publish

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

Adds squad-mark-released.yml — a GitHub Actions workflow that automatically moves all Done items on the MyBlog project board to Released whenever a real GitHub Release is published.

Closes #107

Changes

  • New workflow: .github/workflows/squad-mark-released.yml
  • Triggers on release: published and release: released
  • Skips pre-releases (insider builds) and drafts
  • Paginates through all project items (handles boards > 100 items)
  • Matches Status field by ID (robust against field renames)
  • Uses fieldValues(first: 50) to avoid silent misses

How it fits the release pipeline

squad-milestone-release.yml → creates GitHub Release → release: published
  → squad-mark-released.yml (this) → moves Done → Released
  → release-blog.yml → triggers Bilbo blog post

Testing

Will fire on the next gh release create from squad-milestone-release.yml. Pre-releases from squad-insider-release.yml are skipped.

mpaulosky and others added 23 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>
Adds squad-mark-released.yml that fires on release: published/released.
When a real (non-prerelease, non-draft) GitHub Release is cut, all
project board items in Done status are moved to Released automatically.

- Skips insider pre-releases and draft releases
- Matches Status field by ID (robust against field renames)
- Paginates through all project items (handles boards > 100 items)
- fieldValues(first: 50) avoids silent miss on items with many fields

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 24, 2026 00:41
@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.

@github-actions

Copy link
Copy Markdown
Contributor

Test Results Summary

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

Results for commit 0edf4fd. ± Comparison against base commit b4586cd.

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 automation to keep the MyBlog Project V2 board in sync with the release pipeline by moving Done items to Released when a GitHub Release is published, and adjusts the dev branch preview validation workflow’s test execution.

Changes:

  • Added squad-mark-released.yml to move Project V2 items from Done → Released on release publish events (skipping drafts/prereleases) with pagination.
  • Updated squad-preview.yml to run a subset of test projects explicitly instead of dotnet test on the solution.
  • Minor whitespace-only update to Aragorn agent history.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/squad-mark-released.yml New workflow to paginate Project V2 items and update Status from Done to Released on release publish.
.github/workflows/squad-preview.yml Changes preview validation to run specific test projects rather than all tests via the solution.
.squad/agents/aragorn/history.md Adds a trailing blank line.

Comment on lines 28 to +32
- name: Run unit tests
run: dotnet test MyBlog.slnx --configuration Release --no-build --verbosity normal
run: |
dotnet test tests/Architecture.Tests --configuration Release --no-build --verbosity normal
dotnet test tests/Web.Tests --configuration Release --no-build --verbosity normal
dotnet test tests/Web.Tests.Integration --configuration Release --no-build --verbosity normal

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

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

The step name says "Run unit tests", but it now runs Architecture + Web + Integration tests and no longer runs the other test projects that dotnet test MyBlog.slnx would cover (e.g., AppHost.Tests and Web.Tests.Bunit). Either update the step name and add an inline comment explaining why those projects are intentionally excluded, or include the missing test projects so the workflow continues to validate the full test suite on dev.

Copilot uses AI. Check for mistakes.
Comment on lines +72 to +91
await github.graphql(`
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) {
updateProjectV2ItemFieldValue(input: {
projectId: $projectId
itemId: $itemId
fieldId: $fieldId
value: { singleSelectOptionId: $optionId }
}) {
projectV2Item { id }
}
}
`, {
projectId: PROJECT_ID,
itemId: item.id,
fieldId: STATUS_FIELD_ID,
optionId: RELEASED_OPTION_ID,
});

moved++;
core.info(`✅ Item ${item.id} → Released`);

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

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

The per-item updateProjectV2ItemFieldValue call isn’t wrapped in error handling. As written, a single mutation failure (rate limit, transient network error, 403 due to project permissions, etc.) will fail the entire job mid-loop and leave subsequent Done items unmoved. Consider wrapping the mutation in a try/catch that logs a warning and continues, and optionally provide a specific hint for 403s (similar to other project-board workflows) so operators know how to remediate.

Suggested change
await github.graphql(`
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) {
updateProjectV2ItemFieldValue(input: {
projectId: $projectId
itemId: $itemId
fieldId: $fieldId
value: { singleSelectOptionId: $optionId }
}) {
projectV2Item { id }
}
}
`, {
projectId: PROJECT_ID,
itemId: item.id,
fieldId: STATUS_FIELD_ID,
optionId: RELEASED_OPTION_ID,
});
moved++;
core.info(`✅ Item ${item.id} → Released`);
try {
await github.graphql(`
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $optionId: String!) {
updateProjectV2ItemFieldValue(input: {
projectId: $projectId
itemId: $itemId
fieldId: $fieldId
value: { singleSelectOptionId: $optionId }
}) {
projectV2Item { id }
}
}
`, {
projectId: PROJECT_ID,
itemId: item.id,
fieldId: STATUS_FIELD_ID,
optionId: RELEASED_OPTION_ID,
});
moved++;
core.info(`✅ Item ${item.id} → Released`);
} catch (error) {
const message = error?.message ?? String(error);
core.warning(`⚠️ Failed to move item ${item.id} to Released: ${message}`);
if (error?.status === 403 || message.includes('403')) {
core.warning(
'Hint: received a 403 while updating the project item. ' +
'Ensure GITHUB_TOKEN or the workflow app installation has ' +
'permission to edit this GitHub Project and its fields.'
);
}
}

Copilot uses AI. Check for mistakes.
@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 78.19%. Comparing base (b4586cd) to head (0edf4fd).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #108   +/-   ##
=======================================
  Coverage   78.19%   78.19%           
=======================================
  Files          40       40           
  Lines         642      642           
  Branches      107      107           
=======================================
  Hits          502      502           
  Misses         95       95           
  Partials       45       45           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mpaulosky
mpaulosky merged commit 7813f99 into dev Apr 24, 2026
21 checks passed
@mpaulosky
mpaulosky deleted the squad/107-mark-released-on-publish branch April 24, 2026 00:53
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.

feat: auto-move Done → Released on GitHub Release publish

2 participants