Skip to content

Decouple release assembly, back-port CI/CD fixes, refresh codegen - #110

Merged
ptr727 merged 3 commits into
mainfrom
develop
Jun 5, 2026
Merged

Decouple release assembly, back-port CI/CD fixes, refresh codegen#110
ptr727 merged 3 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Release of develop → main. Carries three changes:

Merge-commit (not squash) per the branching model, so main records develop's tip as the second parent.

ptr727-codegen Bot and others added 3 commits June 4, 2026 05:47
This PR updates the codegen files.

Co-authored-by: ptr727-codegen[bot] <275599072+ptr727-codegen[bot]@users.noreply.github.com>
While porting the two-phase CI/CD pattern into PlexCleaner
(ptr727/PlexCleaner#723), several issues were found that also apply to
ProjectTemplate (the source of truth). Applying them here so the
template and its downstreams converge.

## Correctness
- **Pin release-leaf builds to the resolved commit.**
`build-nugetlibrary`, `build-pypilibrary`, `build-executable`,
`build-docker` were passed the orchestrator's `inputs.ref` (a branch
name on publisher runs) and re-resolved their own version, so a commit
landing mid-run could build artifacts from a different commit than the
release tag (`GitCommitId`) points at. Added `needs: [get-version]` and
pinned their `ref` to `needs.get-version.outputs.GitCommitId`.
- **`github-release` #408/#412 refinements** (already in NxWitness):
check out `GitCommitId` instead of the moving `inputs.ref`; allow
`workflow_dispatch` through the skip-if-exists gate; make the skip log
message event-aware ("will refresh" on dispatch vs "skipping").

## Robustness / hygiene
- **`build-docker` cache-to `ignore-error=true`** so a transient
registry cache export can't fail an otherwise-good publish.
- **Publisher concurrency** scoped to real publishes
(schedule/dispatch/`PUBLISH_ON_MERGE`); no-op `push` runs get a unique
per-run group so they don't queue behind or delay a publish.
- **Gate `smoke-build` on `unit-test`** so the Docker image build isn't
spent when unit tests are already failing.
- **Status badges** filtered to `event=schedule` so they reflect the
weekly publisher's health, not green no-op push runs.
- **Copilot runbook**: fix the REST issue-comments filter to use
`copilot-pull-request-reviewer[bot]` (REST carries the `[bot]` suffix;
GraphQL doesn't), and document that the login form differs by API.

All workflows pass `actionlint`. Handed to the maintainer for merge.
## What

The `github-release` job assembled release assets by referencing
specific build jobs (`build-nugetlibrary`, `build-executable`) by
`artifact-id`. That coupling meant a non-.NET downstream had to fork
`build-release-task.yml` to attach its own artifact, and a .NET project
that subset targets (dropped the executable, kept NuGet) hit an
empty-`artifact-id` download for the dropped target.

This introduces a convention — a target contributes files to the GitHub
release by uploading a workflow artifact named
`release-asset-<branch>-<target>` — and makes `github-release` collect
them by pattern (`release-asset-<branch>-*`, `merge-multiple`) instead
of naming any build job.

## Why

Resolves #108: the release orchestration (tag the built commit, create
the release, attach assets) is now reusable verbatim by any downstream —
a non-.NET project swaps a leaf task instead of forking the
orchestrator. Also fixes the latent subsetting bug for .NET downstreams.

## Changes

- `build-nugetlibrary-task.yml` / `build-executable-task.yml`: rename
release artifacts to `release-asset-<branch>-{nugetlibrary,executable}`;
drop the now-unused `artifact-id` outputs.
- `build-release-task.yml`: `github-release` collects assets via pattern
download; `needs` retained for ordering (a gated-off target simply
contributes no artifact).
- `AGENTS.md` / `README.md`: document the orchestration-vs-build seam
(with an output-type customization guide) and the no-op republish
guarantee.

Docker (Docker Hub) and PyPI (its own publish job) contribute no
`release-asset-*` and are unchanged. `actionlint` was not run locally
(not installed in this environment); workflows parse as valid YAML.

Fixes #108
Copilot AI review requested due to automatic review settings June 5, 2026 01:15

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

This PR updates the template’s release/publish workflows and documentation to make the GitHub Release orchestration reusable across downstream projects (including non-.NET), while back-porting several CI/CD correctness and robustness fixes and refreshing generated code.

Changes:

  • Decouple GitHub Release asset assembly from specific build-job names by adopting the release-asset-<branch>-* artifact convention and downloading assets by pattern.
  • Back-port CI/CD fixes: pin leaf builds to the immutable GitCommitId, improve publisher concurrency behavior, gate smoke builds on unit-test, tolerate Docker cache-export failures, and filter status badges to scheduled runs.
  • Refresh codegen outputs and update documentation/runbook guidance to match the new release seam contract.

Reviewed changes

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

Show a summary per file
File Description
README.md Documents the orchestration-vs-build seam for derived projects and updates status badges to report scheduled publisher health.
CodeGen/CodeGen.cs Updates the generated timestamp constant.
AGENTS.md Codifies the override seam contract and no-op republish guarantees for downstream reuse.
.github/workflows/test-pull-request.yml Gates smoke-build on unit-test to avoid spending Docker builds when tests already fail.
.github/workflows/publish-release.yml Adjusts concurrency grouping so no-op push runs don’t queue behind real publishes.
.github/workflows/build-release-task.yml Pins all leaf builds to GitCommitId and collects GitHub Release assets by release-asset-<branch>-* pattern.
.github/workflows/build-nugetlibrary-task.yml Renames uploaded GitHub Release asset artifact to the release-asset-<branch>-<target> convention and removes unused artifact-id outputs.
.github/workflows/build-executable-task.yml Renames uploaded GitHub Release asset artifact to the release-asset-<branch>-<target> convention and removes unused artifact-id outputs.
.github/workflows/build-docker-task.yml Makes registry cache export tolerant via ignore-error=true on cache-to.
.github/copilot-instructions.md Clarifies Copilot reviewer login differences between GraphQL and REST API usage in the runbook commands.

@ptr727
ptr727 merged commit 572bed9 into main Jun 5, 2026
12 checks passed
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.

Reusable release workflows are coupled to the .NET build — non-.NET downstreams must fork rather than reuse them

2 participants