Conversation
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
Contributor
There was a problem hiding this comment.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release of develop → main. Carries three changes:
github-releasecollects assets by therelease-asset-<branch>-*convention instead of naming build jobs, so the release orchestration is reusable verbatim by downstreams. Fixes Reusable release workflows are coupled to the .NET build — non-.NET downstreams must fork rather than reuse them #108.Merge-commit (not squash) per the branching model, so main records develop's tip as the second parent.