fix(ci): repair the publish chain so the workflow can actually run - #8
Merged
Conversation
The workflow declared `tags:` as a top-level key under `on:`, which is not a valid event. GitHub rejected the file outright: all four runs to date failed in 0s with "workflow file issue", and the v1.0.0 tag never triggered anything. Nothing has ever been built, tested or published. Fixes, in order of impact: - Move `tags: ['v*']` under `push:` so tag pushes trigger the workflow. - `version` job: drop the `github.event_name == 'tag'` condition; tag pushes arrive as `push` events, so the extra clause never matched. - `pack` matrix: point at the real project paths. The entries carried a `src/` prefix, but the projects live at the repo root. - `pack`: use `-p:PackageVersion=` instead of `--version:`, which is not a `dotnet pack` option. - `pack`: drop `--no-build`. The job runs on a fresh runner with no artifacts downloaded, so there is nothing pre-built to package. - `pack`: matrix values are now folder names, not paths, because `upload-artifact` rejects artifact names containing "/". - `release` now depends on `publish`, so a GitHub Release cannot appear for a version whose packages failed to reach NuGet. - Rename the workflow `CI / CD` -> `CI`; the slash made the legacy badge URL ambiguous. README badge switched to the file-based form. Verified locally on .NET 10.0.201: - `dotnet build -c Release`: 0 warnings, 0 errors - `dotnet test -c Release`: 13/13 passed - `dotnet pack -p:PackageVersion=1.2.3-test`: all 6 packages produced, each carrying the version in its filename and a populated lib/net10.0/ Closes #1 Closes #2 Closes #3 Closes #4 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 3, 2026
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.
Closes #1, closes #2, closes #3, closes #4.
Root cause — worse than the issues described
While fixing the
packjob I found the workflow has never executed.on:declaredtags:as a top-level key:tagsis not a GitHub Actions event; it only exists nested underpush. GitHub rejects the whole file, so:v1.0.0tag produced no run at allThat is why the NuGet profile shows 0 packages. The
src/paths in #1 were real, but they were never even reached.Fixes
tags: ['v*']moved underpush:so tag pushes trigger the workflowversionjob: droppedgithub.event_name == 'tag'— tag pushes arrive aspush, so that clause never matchedpackmatrix 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 artifact names containing/, sopackages-src/Beyond…csprojwould have failed even after #1releasenow depends onpublish, so a GitHub Release cannot appear for a version whose packages never reached NuGetCI / CD→CI(the slash made the legacy badge URL ambiguous); README badge switched to the file-based formVerification
Locally, on .NET 10.0.201 (matching
global.json):All six packages produced, each carrying the version in its filename and a populated
lib/net10.0/:CI on this PR is the real proof: it is the first run this workflow has ever been able to attempt.
Before releasing
Two things this PR cannot do for you:
NUGET_API_KEYmust exist in thenuget-releaseenvironment, orpublishfails at the last step.v1.0.0tag is stale — it points at a commit whose workflow could not run. Re-tag after merging (git tag -f v1.0.0or, cleaner, cutv1.0.1) to trigger the first real publish.Not touched
The
releasejob generates notes fromlistCommits({since: '2024-01-01'}), a hardcoded date that will drift. Out of scope here — worth its own issue.🤖 Generated with Claude Code