Skip to content

Retire the both-branch matrix for symmetric single-branch self-release - #249

Merged
ptr727 merged 2 commits into
developfrom
feature/publisher-symmetric-release
Jul 6, 2026
Merged

Retire the both-branch matrix for symmetric single-branch self-release#249
ptr727 merged 2 commits into
developfrom
feature/publisher-symmetric-release

Conversation

@ptr727

@ptr727 ptr727 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

PR B of the release-model simplification (PR A #248 landed the Docker platform split). Rewrites the publisher + the WORKFLOW.md contract.

Hub publisher (publish-release.yml) -> dispatch-only single-branch. Drops the branch matrix, the plan job, the weekly schedule (a Docker base-image refresh concept that does nothing for a source archive), the push auto-publish, PUBLISH_ON_MERGE, and IGNORE_GITHUB_REF (each run builds one branch, so github.ref names it and NBGV classifies it directly). A source-only release is a deliberate dispatch of main (release) or develop (prerelease).

WORKFLOW.md contract updated to the single-branch model: each publish builds one branch; Docker/package repos self-release the pushed branch on a release-affecting push (shared paths filter) + a main-only weekly schedule + dispatch; source-only repos dispatch only. D3.1/D4.1/D2.3, the release-model prose + diagram, and the 5B scenarios (S5-S8) rewritten; the IGNORE_GITHUB_REF requirement and the both-branch matrix retired.

Held for your merge - it rewrites the hub live release pipeline and the fleet release contract. The Docker/package repo rollout (symmetric push + paths filter) follows per-repo.

Rewrite the hub publisher to dispatch-only single-branch (source-only repo: a release is a deliberate dispatch of main or develop): drop the branch matrix, the plan job, the weekly schedule (a Docker base-image concept that does nothing for a source archive), the push auto-publish, PUBLISH_ON_MERGE, and IGNORE_GITHUB_REF (each run builds one branch, so github.ref names it and NBGV classifies it directly). Update the WORKFLOW.md contract to match: each publish builds a single branch; Docker/package repos self-release the pushed branch on a release-affecting push plus a main-only weekly schedule and dispatch, source-only repos dispatch only; D3.1/D4.1/D2.3 and the release-model diagram and 5B scenarios rewritten; the IGNORE_GITHUB_REF requirement retired.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 6, 2026 17:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Simplifies the release model by retiring the both-branch publish matrix in favor of a single-branch publish run, updating both the hub publisher workflow and the WORKFLOW.md contract to match a dispatch-driven source-only release model.

Changes:

  • Updated WORKFLOW.md release-model contract and scenarios to describe single-branch publishing (main = release, develop = prerelease) and remove matrix-specific requirements.
  • Simplified .github/workflows/publish-release.yml to be dispatch-only, publishing exactly the dispatched branch and removing the plan/matrix plumbing.
  • Added an explicit dispatch-branch guard to prevent publishing from unintended refs.

Reviewed changes

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

File Description
WORKFLOW.md Updates the release contract and scenarios to the single-branch publisher model.
.github/workflows/publish-release.yml Reworks the hub publisher into a dispatch-only, single-branch release workflow.

Comment thread WORKFLOW.md Outdated
Comment thread .github/workflows/publish-release.yml
D2.3 now allows a dispatch from main or develop, so the 5A checklist says the publisher rejects only other refs. Re-add the release-exists check + the exists-or-dispatch gate on the create step so the reference publisher still demonstrates the D4.4 no-op-republish pattern for repos that re-run on a schedule. Addresses Copilot review.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comments suppressed due to low confidence (1)

.github/workflows/publish-release.yml:67

  • The Create GitHub release step is currently unconditional because this workflow only runs on workflow_dispatch, so github.event_name == 'workflow_dispatch' makes the if: expression always true. That means release-exists is computed but never used to enforce the documented no-op republish behavior, and repeated dispatches will re-run the release-update path (potentially regenerating release notes) even when the tag already exists.
      # Skip create on an existing tag (no-op republish); a re-dispatch refreshes it.
      - name: Check for existing release step
        id: release-exists
        env:
          GH_TOKEN: ${{ github.token }}
          TAG: ${{ steps.nbgv.outputs.SemVer2 }}
        run: |
          set -euo pipefail
          if gh release view "$TAG" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
            echo "exists=true" >> "$GITHUB_OUTPUT"
          else
            echo "exists=false" >> "$GITHUB_OUTPUT"
          fi

      # target_commitish pins the tag to the exact built commit (GitCommitId), not the default branch. The release is
      # the tag plus GitHub's auto source archive, README, and LICENSE - no build assets (source-only).
      - name: Create GitHub release step
        if: ${{ steps.release-exists.outputs.exists == 'false' || github.event_name == 'workflow_dispatch' }}
        uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1

@ptr727
ptr727 merged commit 879d471 into develop Jul 6, 2026
7 checks passed
@ptr727
ptr727 deleted the feature/publisher-symmetric-release branch July 6, 2026 18:17
@ptr727 ptr727 mentioned this pull request Jul 7, 2026
ptr727 added a commit that referenced this pull request Jul 7, 2026
Two-phase promotion of the accumulated governance work on `develop` to
`main`. Carries #244-#251:

- #244 Foundational Principles (the model's governing *why*)
- #245 Replace the mypy ban with a strong-typing policy
- #246 aiopurpleair + homeassistant-purpleair audit reports
- #247 Catalog the 14 backlog repos; add the `eda` type and
`releaseTrigger: none`
- #248 Branch-conditional Docker platforms (multi-arch main, amd64
elsewhere)
- #249 Retire the both-branch matrix for symmetric single-branch
self-release
- #250 Declare workflow YAML as LF and validate line endings in CI
- #251 Extend line-ending governance to pattern files and catalog
snippets

All commits were reviewed and CI-green on their individual develop PRs.
ptr727 added a commit that referenced this pull request Jul 7, 2026
Codifies your rule: **C# and Python projects must report coverage to
Codecov** (best-effort, `CODECOV_TOKEN` present). Promotes codecov from
an opt-in feature to a per-language requirement.

- **project-types.json** — new `csharp.coverage.codecov` +
`python.coverage.codecov` checks.
- **secrets.json** — new `typeMechanisms` (`csharp`/`python` ->
`codecov`) so the audit *requires* the codecov mechanism (CODECOV_TOKEN)
for those types; `secrets.schema.json` gains the property; the top
`note` explains it.
- **WORKFLOW.md D1.6** — the coverage guarantee (best-effort:
`fail_ci_if_error: false`, so a Codecov outage never reds the gate).

The implementation PRs land alongside: PlexCleaner already wired;
Utilities #377, LanguageTags #249, NxWitness #490 add the upload step +
coverlet + `secrets: inherit`; aiopurpleair/HA already conformant. jq +
validate.py (23 cataloged) + markdownlint + editorconfig-checker all
clean.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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