Skip to content

Commit b51e61f

Browse files
beyondnetPeruclaude
andcommitted
fix(ci): repair the publish chain so the workflow can actually run
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>
1 parent 8a3dcc0 commit b51e61f

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

.github/workflows/build.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
name: CI / CD
1+
name: CI
22

33
on:
44
push:
55
branches: [main, develop]
6+
tags: ['v*']
67
pull_request:
78
branches: [main, develop]
8-
tags:
9-
- 'v*'
109

1110
env:
1211
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
@@ -59,7 +58,7 @@ jobs:
5958
name: Determine Version
6059
runs-on: ubuntu-latest
6160
needs: build-and-test
62-
if: github.event_name == 'push' || github.event_name == 'tag'
61+
if: github.event_name == 'push'
6362
outputs:
6463
version: ${{ steps.version.outputs.version }}
6564
is_release: ${{ steps.version.outputs.is_release }}
@@ -89,11 +88,13 @@ jobs:
8988
if: needs.version.outputs.is_release == 'true'
9089
strategy:
9190
matrix:
91+
# Folder and assembly name match, so one value drives both the csproj
92+
# path and the artifact name (artifact names cannot contain "/").
9293
project:
93-
- src/BeyondNetCode.Shell.Bootstrapper/BeyondNetCode.Shell.Bootstrapper.csproj
94-
- src/BeyondNetCode.Shell.Bootstrapper.DependencyInjection/BeyondNetCode.Shell.Bootstrapper.DependencyInjection.csproj
95-
- src/BeyondNetCode.Shell.Bootstrapper.AutoMapper/BeyondNetCode.Shell.Bootstrapper.AutoMapper.csproj
96-
- src/BeyondNetCode.Shell.Bootstrapper.Observability/BeyondNetCode.Shell.Bootstrapper.Observability.csproj
94+
- BeyondNetCode.Shell.Bootstrapper
95+
- BeyondNetCode.Shell.Bootstrapper.DependencyInjection
96+
- BeyondNetCode.Shell.Bootstrapper.AutoMapper
97+
- BeyondNetCode.Shell.Bootstrapper.Observability
9798
steps:
9899
- uses: actions/checkout@v4
99100

@@ -104,10 +105,9 @@ jobs:
104105

105106
- name: Pack
106107
run: |
107-
dotnet pack "${{ matrix.project }}" \
108+
dotnet pack "${{ matrix.project }}/${{ matrix.project }}.csproj" \
108109
-c Release \
109-
--version:${{ needs.version.outputs.version }} \
110-
--no-build \
110+
-p:PackageVersion=${{ needs.version.outputs.version }} \
111111
-p:PackageOutputPath=${{ github.workspace }}/nupkgs
112112
113113
- name: Upload artifacts
@@ -150,7 +150,7 @@ jobs:
150150
release:
151151
name: Create GitHub Release
152152
runs-on: ubuntu-latest
153-
needs: [version]
153+
needs: [version, publish]
154154
if: needs.version.outputs.is_release == 'true'
155155
steps:
156156
- uses: actions/checkout@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<img src="https://img.shields.io/badge/NuGet-BeyondNetCode-blue" alt="NuGet" />
1212
</a>
1313
<a href="https://github.com/beyondnetcode/Shell.Bootstrapper/actions">
14-
<img src="https://github.com/beyondnetcode/Shell.Bootstrapper/workflows/CI%20/%20CD/badge.svg" alt="Build" />
14+
<img src="https://github.com/beyondnetcode/Shell.Bootstrapper/actions/workflows/build.yml/badge.svg" alt="Build" />
1515
</a>
1616
</p>
1717
</div>

0 commit comments

Comments
 (0)