Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ project-path inputs among them.
Pick by where each artifact *goes*, not by language:

- **Files attached to the GitHub Release** (zips, binaries, packaged libraries): a dotnet-publish
hook or a build-nuget hook per output, each uploading `release-asset-<branch>-<target>`. This is where the
.NET `dotnet publish` or `dotnet build` lives, though a package push does not. The hub default takes an explicit
project path, and a project needing different build behavior replaces the hook. A data-only
repo's own output (e.g. a symbol library) is a file target, which the `build-release-asset` hook
hook or a build-nuget hook per output, each uploading `release-asset-<branch>-<target>`.
The default PyPI leaf uploads one too.
The .NET `dotnet publish` lives in the dotnet-publish hook and `dotnet build` in the build-nuget hook, though a package push lives in neither.
The hub default takes an explicit project path.
A project needing different build behavior replaces the hook.
A data-only repo's own output (e.g. a symbol library) is a file target, which the `build-release-asset` hook
builds when the caller sets `enable_release_asset: true`. The hook has no hub default, so the caller provides
`.github/actions/build-release-asset/action.yml` and the task fails without it.
- **Package-registry pushes** (NuGet.org, PyPI): each is split, and the push never sits in the
Expand All @@ -61,11 +63,12 @@ Pick by where each artifact *goes*, not by language:
build-nuget hook uploads a `nuget-build-<branch>` artifact for a separate `publish-nuget` job in
the caller's own `publish-release.yml`. That job authenticates through `NuGet/login` and therefore
carries `id-token: write` (plus `actions: write` to delete the artifact it consumed). The hook
*also* uploads a `release-asset-*` (.7z) for the GitHub release. PyPI is the same shape: the build-pypi hook only builds and uploads the
`pypi-build-<branch>` artifact. The separate `publish-pypi` job in the caller's own
`publish-release.yml` does the OIDC Trusted-Publishing upload, behind an `environment: pypi`
gate and with `skip-existing: true`. The `id-token: write` permission is granted only at that
one entry point. PyPI contributes **no** `release-asset-*`.
*also* uploads a `release-asset-*` (.7z) for the GitHub release.
PyPI is the same shape.
The hub default leaf uploads the `pypi-build-<branch>` artifact and a `release-asset-<branch>-pypi` carrying the wheel and sdist.
The separate `publish-pypi` job in the caller's own `publish-release.yml` does the OIDC Trusted-Publishing upload.
It runs behind an `environment: pypi` gate and with `skip-existing: true`.
The `id-token: write` permission is granted only at that one entry point.
- **Image-registry pushes** (Docker Hub): `build-docker-task.yml`, hub-hosted like
`build-release-task.yml`, pushes the default branch multi-arch (amd64+arm64) and any other
branch `amd64`-only, and contributes **no** `release-asset-*`. The image set comes from a docker-prepare hook (the hub default emits the
Expand Down
6 changes: 3 additions & 3 deletions .agents/skills/dotnet-codestyle/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ Shared MSBuild configuration is centralized at the repository root, never duplic
sets a singular `TargetFramework`, the multi-targeted `.csproj` clears it, since a singular value
wins and builds one framework only. Its test projects run each framework under that framework's
own runtime. So the repository passes the hub's `validate-task.yml` a `dotnet-versions` input
naming every line, the `global.json` line first, such as `'["11.0", "10.0"]'`. That installs
each line beside the selected one in the one unit-test job. An entry leading with another line
fails the run.
naming every line, the `global.json` line first, such as `'["11.0", "10.0"]'`. Each line then
runs as its own unit-test leg, with every line installed beside the selected one. An entry
leading with another line fails the run.

A developer host now needs a release SDK on the repository's line, 10.0.x for the fleet default
today. A host holding only another major, or only a 10.0 preview, fails with a clear error. It
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ A target contributes a file to the GitHub release by uploading a workflow artifa
flowchart LR
dotnet[dotnet-publish] -->|release-asset-BRANCH-dotnet-publish| store[(run artifacts)]
nuget[build-nuget] -->|release-asset-BRANCH-nuget| store
pypi[build-pypi] -->|release-asset-BRANCH-pypi| store
store -->|pattern + merge-multiple| rel["github-release job (D6)"]
nuget -->|nuget-build-BRANCH| pub["publish-TARGET job in the repo's own publisher"]
pypi[build-pypi] -->|pypi-build-BRANCH| pub
pypi -->|pypi-build-BRANCH| pub
pub -->|push| registries[(registries)]
docker[build-docker] -->|push| registries
```
Expand Down Expand Up @@ -102,10 +103,10 @@ flowchart TD
Pick each output's path by **where the artifact goes**:

- **File on the GitHub release** (zip, binary, packaged library): one leaf per output uploading `release-asset-<branch>-<name>`. For a repo calling the hub-hosted task, the path is instead the files its `build-release-asset` hook writes, which the task uploads as one such artifact. The repo keeps `expect_release_assets: true` (its default).
- **Package-registry push** (NuGet, PyPI): the leaf builds and uploads a build artifact (`nuget-build-<branch>` / `pypi-build-<branch>`). A separate `publish-<target>` job in the **publishing repository's own** publisher consumes it and pushes. Each registry publishes through OIDC Trusted Publishing, never a stored API key, and that push sits outside the leaf for the reasons that follow. Trusted publishing validates the OIDC token's `job_workflow_ref` claim, which names the workflow the job actually ran from. So a push made from a reusable workflow a *different* repository hosts is rejected at the token exchange. There NuGet.org answers `HTTP 401` with `does not start with <owner>/<repo>/.github/workflows/`. That alone rules out a leaf another repository hosts. A leaf this repository hosts clears the claim, and the split still applies to it. That is because a called job declaring no `permissions:` runs under the calling job's whole grant. So a push anywhere inside the release task would put `id-token: write` on every job in it, rather than at the one entry point D7.2 requires. The registered trusted-publishing policy therefore names the publisher, `publish-release.yml`. PyPI additionally gates its publish job behind an environment. NuGet.org binds its policy to the workflow file rather than to an environment and needs none. NuGet's leaf also uploads a `release-asset-*` carrying the package, and PyPI contributes none.
- **Package-registry push** (NuGet, PyPI): the leaf builds and uploads a build artifact (`nuget-build-<branch>` / `pypi-build-<branch>`). A separate `publish-<target>` job in the **publishing repository's own** publisher consumes it and pushes. Each registry publishes through OIDC Trusted Publishing, never a stored API key, and that push sits outside the leaf for the reasons that follow. Trusted publishing validates the OIDC token's `job_workflow_ref` claim, which names the workflow the job actually ran from. So a push made from a reusable workflow a *different* repository hosts is rejected at the token exchange. There NuGet.org answers `HTTP 401` with `does not start with <owner>/<repo>/.github/workflows/`. That alone rules out a leaf another repository hosts. A leaf this repository hosts clears the claim, and the split still applies to it. That is because a called job declaring no `permissions:` runs under the calling job's whole grant. So a push anywhere inside the release task would put `id-token: write` on every job in it, rather than at the one entry point D7.2 requires. The registered trusted-publishing policy therefore names the publisher, `publish-release.yml`. PyPI additionally gates its publish job behind an environment. NuGet.org binds its policy to the workflow file rather than to an environment and needs none. NuGet's and PyPI's default leaves also upload a `release-asset-*` carrying the package files.
- **Image-registry push** (Docker): the leaf pushes the default branch multi-arch (amd64+arm64) and any other branch `amd64`-only, and contributes no `release-asset-*`. The arm64 emulation is reserved for the released image.
- **Filesystem on a host the project owns** (a static site, a config tree): the leaf builds the tree and ships it to the host. It contributes no `release-asset-*`. The transport is the repo's own. The contract fixes the rest. The deploy is a **separate `workflow_dispatch`** from the release, so a redeploy of an unchanged commit mints no tag. A host rebuild, a rollback, or proving a branch on a non-production environment then costs nothing. Its credentials come from a **per-environment GitHub Environment** rather than the repository secret store. The deploy also ends by asserting **what the host serves** rather than the transport's exit status (D4.6). Retention at the destination is bounded by a declared count, with one side recorded as owning the prune. That side is the deploy where its credential can observe the destination, and the host where that credential is deliberately write-only (D5.6).
- **No file target via the release task** (Docker-only, PyPI-only, source-only): the release is tag + source zip + README + LICENSE. The caller **MUST pass `expect_release_assets: false`** to the release task. A publisher with file targets retains the default `true`. This setting is caller-specific. The default `true` fails on `fail_on_unmatched_files` when no assets exist. A **source-only** repo also passes every `enable_*` input as false because it has no build leaf (see `WORKFLOW.md` section 6).
- **No file target** (Docker-only, source-only, or PyPI-only with a no-asset hook): the release is tag + source zip + README + LICENSE. The caller **MUST pass `expect_release_assets: false`** to the release task. A publisher with file targets retains the default `true`. This setting is caller-specific. The default `true` fails on `fail_on_unmatched_files` when no assets exist. A **source-only** repo also passes every `enable_*` input as false because it has no build leaf (see `WORKFLOW.md` section 6).

`WORKFLOW.md` section 3 keeps the architecture. The `workflow-ci-contract` Skill carries this section whole as a generated include, at `.agents/skills/workflow-ci-contract/references/architecture.md` in the hub. That path is not a repo-relative link, since it is hub-local and not carried into every fleet repo.

Expand Down
Loading
Loading