Skip to content

fix(ci): repair the publish chain so the workflow can actually run - #3

Merged
beyondnetPeru merged 1 commit into
mainfrom
fix/ci-publish-chain
Aug 3, 2026
Merged

fix(ci): repair the publish chain so the workflow can actually run#3
beyondnetPeru merged 1 commit into
mainfrom
fix/ci-publish-chain

Conversation

@beyondnetPeru

Copy link
Copy Markdown
Contributor

Same defect and same fix as beyondnetcode/Shell.Aop#8, which is already merged and green. build.yml is copy-pasted across the Shell.* family, so every repo inherited it.

Root cause

on: declared tags: as a top-level key, which is not a GitHub Actions event:

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main, develop]
  tags:          # <- not a valid event
    - 'v*'

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" — CI has never executed, and the 5 tests in this repo have never run on any commit.

Fixes

  • tags: ['v*'] moved under push:
  • version job: dropped github.event_name == 'tag' — tag pushes arrive as push
  • pack matrix points at the real project locations (repo root, not src/)
  • -p:PackageVersion= replaces --version:, which is not a dotnet pack option
  • --no-build dropped; the job runs on a fresh runner with nothing pre-built
  • matrix values are folder names — upload-artifact rejects names containing /
  • release now depends on publish, so no Release appears for packages that never shipped
  • workflow renamed CI / CDCI; README badge switched to the file-based URL

Verification

Locally on .NET 10.0.201 (matching global.json):

dotnet build BeyondNet.Bootstrapper.sln -c Release  → 0 errors (2 warnings)
dotnet test  BeyondNet.Bootstrapper.sln -c Release  → 5/5 passed
dotnet pack  <each of the 4 matrix projects> -p:PackageVersion=9.9.9-test

All four packages produced with the version in the filename and a populated lib/net10.0/.

Before releasing

NUGET_API_KEY must exist in the nuget-release environment, or publish fails at the last step.

🤖 Generated with Claude Code

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, 5/5 tests passing,
and every matrix project packs with the version in its filename.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@beyondnetPeru
beyondnetPeru merged commit 4634b67 into main Aug 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant