fix(ci): repair the publish chain so the workflow can actually run - #2
Merged
Conversation
The workflow declared `tags:` as a top-level key under `on:`, which is not a valid event. GitHub rejected the file outright: every run in this repo's history failed in 0s with "workflow file issue". CI has never executed and the tests have never run on any commit. - Move `tags: ['v*']` under `push:` so tag pushes trigger the workflow - Drop the `github.event_name == 'tag'` clause; tag pushes are `push` - Point the pack matrix at the real project paths (root, not `src/`) - Use `-p:PackageVersion=` instead of the invalid `--version:` - Drop `--no-build`; the pack job runs on a fresh runner - Use folder names in the matrix; artifact names cannot contain "/" - Make `release` depend on `publish` - Rename `CI / CD` -> `CI` and switch the README badge to the file-based URL Verified locally on .NET 10.0.201: build clean, 58/58 tests passing, and every matrix project packs with the version in its filename. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
3 tasks
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.
Same workflow defect as beyondnetcode/Shell.Aop#8 (already merged and green), plus two packaging bugs unique to this repo that made
dotnet packfail outright.Root cause 1 — the workflow was never valid
on:declaredtags:as a top-level key, which is not a GitHub Actions event:GitHub rejects the whole file. Every run in this repo's history failed in 0 seconds with "This run likely failed because of a workflow file issue" — the 58 tests in this repo have never run on any commit.
Root cause 2 —
packfailed before producing anythingTwo bugs in the
.csprojfiles, both invisible until the workflow could actually run:NU5019— file not found. Every project referenced../../LICENSEand../../README.md(../../../in one case), paths that assume asrc/<project>/layout. The projects live at the repo root, so those paths resolve outside the repository. Corrected to../.NU5030— license file not in the package.<PackagePath>LICENSE</PackagePath>has no file extension, so NuGet treats it as a directory: the file landed atLICENSE/LICENSEwhile<PackageLicenseFile>LICENSE</PackageLicenseFile>looked for it at the root. Corrected to<PackagePath>/</PackagePath>, which places the file at the package root under its own name.README.mdwas unaffected because its extension made NuGet read it as a file path.Worth noting: the same
LICENSE/LICENSEmisplacement exists inShell.Factoryand is fixed in its parallel PR.Shell.AopandShell.Bootstrapperare unaffected — they usePackageLicenseExpressioninstead of a packed file.Workflow fixes
tags: ['v*']moved underpush:versionjob: droppedgithub.event_name == 'tag'— tag pushes arrive aspushpackmatrix points at the real project locations (repo root, notsrc/)-p:PackageVersion=replaces--version:, which is not adotnet packoption--no-builddropped; the job runs on a fresh runner with nothing pre-builtupload-artifactrejects names containing/releasenow depends onpublishCI / CD→CI; README badge switched to the file-based URLVerification
Locally on .NET 10.0.201 (matching
global.json):All three packages produced, each with
lib/net10.0/, andLICENSE+README.mdat the package root — verified withunzip -l.Before releasing
NUGET_API_KEYmust exist in thenuget-releaseenvironment, orpublishfails at the last step.🤖 Generated with Claude Code