Outcome
Make the CI and release pipeline safe and reproducible for this repository's bare SemVer tags, such as 2.0.0.
Scope
-
Tag-gated, fail-closed publishing
- Publish only from a protected SemVer tag push or an explicitly approved production release run.
- Do not publish on ordinary pushes to
main, release/**, or hotfix/**.
- Validate that the tag exactly matches the GitVersion package version.
- Fail on duplicate or mismatched package versions instead of silently skipping them.
-
Publish the exact validated artifacts
- Pack once in the validation workflow.
- Upload the
.nupkg and .snupkg artifacts plus checksums.
- Publish those exact artifacts after verifying their commit, tag, version, and hashes.
-
Validate final packages before push
- Run package-level API compatibility checks.
- Run clean-consumer tests against the packed artifacts for supported target frameworks and language/Roslyn hosts.
- Exercise static, instance, nested-collection, and cycle-detection mappings.
- Run trimmed and Native AOT sample publish/execute checks.
- Verify package contents do not include generator/Roslyn runtime assets.
-
Make test discovery explicit
- Mark the four test projects with
<IsTestProject>true</IsTestProject> or enumerate test projects directly in CI.
- Keep samples and benchmarks as explicit
dotnet run validations; do not force the test property across the whole solution.
-
Harden workflow governance
- Keep one canonical workflow and remove or clearly retire the inactive
.ym_ copies.
- Protect release tags and the NuGet publishing environment with required checks and human approval.
- Use least-privilege credentials and retain release artifacts/provenance.
-
Synchronize release documentation
- Update
STATUS.md, IMPLEMENTATION_PLAN.md, and any release checklist to reflect the actual CI, packaging, AOT, trimming, API-compatibility, and reproducibility evidence.
Acceptance criteria
- A push of
2.0.0-style tags runs validation and can publish the matching packages.
- A non-tag branch push cannot publish to NuGet.
- A malformed or mismatched tag, duplicate version, or tampered artifact fails before push; a valid prerelease tag is not rejected solely because it is prerelease.
- The release job publishes only artifacts produced and validated for the same commit/tag.
- All required package, consumer, API-compatibility, trimming, Native AOT, and mapping tests pass.
- Test discovery is explicit and local CI commands do not silently skip test projects.
- Release documentation and workflow files agree with
SPECIFICATION.md.
- Dry-run executes the same build, pack, package, consumer, API-compatibility, mapping, trimming, Native AOT, artifact-integrity, and version/tag validations as production.
- Dry-run produces and retains the packages and checksums, reports what would be published, and never calls NuGet push or otherwise mutates NuGet.
- Stable and prerelease bare SemVer tags, including 2.0.0-alpha.1 and 2.0.1-beta.1, are accepted and must match the package version exactly.
- Automated tests cover stable tags, alpha/beta tags, invalid or mismatched tags, and prove that dry-run never publishes.
Notes
The repository uses bare SemVer tags (for example, 2.0.0), not v-prefixed tags. This issue is intentionally created in state:draft; add ready:agent when the implementation scope is approved for AgentStack execution.
Addendum: safe dry-run and prerelease tags
The release workflow must support a complete, non-publishing rehearsal and bare SemVer prerelease tags.
- Add a dry-run mode that executes the same build, pack, package-content, API-compatibility, clean-consumer, mapping, trimming, Native AOT, artifact-integrity, and version/tag checks as production.
- Dry-run must produce and retain the exact packages and checksums and report what would be published, but must not call NuGet push or otherwise mutate NuGet. The production path should differ only at the final, approval-gated publish step.
- Accept stable and prerelease bare SemVer tags, including examples such as
2.0.0-alpha.1 and 2.0.1-beta.1; validate the complete tag as SemVer and require the package version to match it exactly.
- Add tests proving both stable and alpha/beta tags are accepted, invalid or mismatched tags are rejected, and dry-run never publishes.
Outcome
Make the CI and release pipeline safe and reproducible for this repository's bare SemVer tags, such as
2.0.0.Scope
Tag-gated, fail-closed publishing
main,release/**, orhotfix/**.Publish the exact validated artifacts
.nupkgand.snupkgartifacts plus checksums.Validate final packages before push
Make test discovery explicit
<IsTestProject>true</IsTestProject>or enumerate test projects directly in CI.dotnet runvalidations; do not force the test property across the whole solution.Harden workflow governance
.ym_copies.Synchronize release documentation
STATUS.md,IMPLEMENTATION_PLAN.md, and any release checklist to reflect the actual CI, packaging, AOT, trimming, API-compatibility, and reproducibility evidence.Acceptance criteria
2.0.0-style tags runs validation and can publish the matching packages.SPECIFICATION.md.Notes
The repository uses bare SemVer tags (for example,
2.0.0), notv-prefixed tags. This issue is intentionally created instate:draft; addready:agentwhen the implementation scope is approved for AgentStack execution.Addendum: safe dry-run and prerelease tags
The release workflow must support a complete, non-publishing rehearsal and bare SemVer prerelease tags.
2.0.0-alpha.1and2.0.1-beta.1; validate the complete tag as SemVer and require the package version to match it exactly.