Skip to content

Commit 4d95387

Browse files
fix(ci): repair the publish chain so the workflow can actually run (#2)
`tags:` was a top-level key under `on:`, which is not a valid event, so GitHub rejected the workflow outright — every run failed in 0s and the 58 tests had never executed in CI. Packaging was broken independently: - NU5019: csproj referenced ../../LICENSE and ../../README.md, paths that assume a src/<project>/ layout and resolve outside the repo -> ../ - NU5030: <PackagePath>LICENSE</PackagePath> has no extension, so NuGet treated it as a directory and the file landed at LICENSE/LICENSE -> / Workflow: tags under push, no bogus 'tag' event, real pack paths, -p:PackageVersion=, no --no-build, folder-based artifact names, release depends on publish, CI / CD -> CI, README badge fixed. Verified locally: build clean, 58/58 tests, 3 packages with LICENSE and README.md at the package root.
1 parent 4ac6fbc commit 4d95387

323 files changed

Lines changed: 9568 additions & 21 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 11 additions & 11 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,10 +88,12 @@ 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.Ddd/BeyondNetCode.Shell.Ddd.csproj
94-
- src/BeyondNetCode.Shell.Ddd.ValueObjects/BeyondNetCode.Shell.Ddd.ValueObjects.csproj
95-
- src/BeyondNetCode.Shell.Ddd.AutoMapper/BeyondNetCode.Shell.Ddd.AutoMapper.csproj
94+
- BeyondNetCode.Shell.Ddd
95+
- BeyondNetCode.Shell.Ddd.ValueObjects
96+
- BeyondNetCode.Shell.Ddd.AutoMapper
9697
steps:
9798
- uses: actions/checkout@v4
9899

@@ -103,10 +104,9 @@ jobs:
103104

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

BeyondNetCode.Shell.Ddd.AutoMapper/BeyondNetCode.Shell.Ddd.AutoMapper.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
</ItemGroup>
2626

2727
<ItemGroup>
28-
<None Include="../../LICENSE">
28+
<None Include="../LICENSE">
2929
<Pack>True</Pack>
30-
<PackagePath>LICENSE</PackagePath>
30+
<PackagePath>/</PackagePath>
3131
</None>
32-
<None Include="../../README.md">
32+
<None Include="../README.md">
3333
<Pack>True</Pack>
3434
<PackagePath>README.md</PackagePath>
3535
</None>
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"runtimeTarget": {
3+
"name": ".NETCoreApp,Version=v10.0",
4+
"signature": ""
5+
},
6+
"compilationOptions": {},
7+
"targets": {
8+
".NETCoreApp,Version=v10.0": {
9+
"BeyondNetCode.Shell.Ddd.AutoMapper/1.0.0": {
10+
"dependencies": {
11+
"AutoMapper": "12.0.1",
12+
"BeyondNetCode.Shell.Ddd": "9.9.9-test"
13+
},
14+
"runtime": {
15+
"BeyondNetCode.Shell.Ddd.AutoMapper.dll": {}
16+
}
17+
},
18+
"AutoMapper/12.0.1": {
19+
"runtime": {
20+
"lib/netstandard2.1/AutoMapper.dll": {
21+
"assemblyVersion": "12.0.0.0",
22+
"fileVersion": "12.0.1.0"
23+
}
24+
}
25+
},
26+
"MediatR/12.4.1": {
27+
"dependencies": {
28+
"MediatR.Contracts": "2.0.1",
29+
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.0"
30+
},
31+
"runtime": {
32+
"lib/net6.0/MediatR.dll": {
33+
"assemblyVersion": "12.0.0.0",
34+
"fileVersion": "12.4.1.0"
35+
}
36+
}
37+
},
38+
"MediatR.Contracts/2.0.1": {
39+
"runtime": {
40+
"lib/netstandard2.0/MediatR.Contracts.dll": {
41+
"assemblyVersion": "2.0.1.0",
42+
"fileVersion": "2.0.1.0"
43+
}
44+
}
45+
},
46+
"Microsoft.Extensions.DependencyInjection.Abstractions/8.0.0": {
47+
"runtime": {
48+
"lib/net8.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
49+
"assemblyVersion": "8.0.0.0",
50+
"fileVersion": "8.0.23.53103"
51+
}
52+
}
53+
},
54+
"BeyondNetCode.Shell.Ddd/9.9.9-test": {
55+
"dependencies": {
56+
"MediatR": "12.4.1"
57+
},
58+
"runtime": {
59+
"BeyondNetCode.Shell.Ddd.dll": {
60+
"assemblyVersion": "1.0.0.0",
61+
"fileVersion": "1.0.0.0"
62+
}
63+
}
64+
}
65+
}
66+
},
67+
"libraries": {
68+
"BeyondNetCode.Shell.Ddd.AutoMapper/1.0.0": {
69+
"type": "project",
70+
"serviceable": false,
71+
"sha512": ""
72+
},
73+
"AutoMapper/12.0.1": {
74+
"type": "package",
75+
"serviceable": true,
76+
"sha512": "sha512-hvV62vl6Hp/WfQ24yzo3Co9+OPl8wH8hApwVtgWpiAynVJkUcs7xvehnSftawL8Pe8FrPffBRM3hwzLQqWDNjA==",
77+
"path": "automapper/12.0.1",
78+
"hashPath": "automapper.12.0.1.nupkg.sha512"
79+
},
80+
"MediatR/12.4.1": {
81+
"type": "package",
82+
"serviceable": true,
83+
"sha512": "sha512-0tLxCgEC5+r1OCuumR3sWyiVa+BMv3AgiU4+pz8xqTc+2q1WbUEXFOr7Orm96oZ9r9FsldgUtWvB2o7b9jDOaw==",
84+
"path": "mediatr/12.4.1",
85+
"hashPath": "mediatr.12.4.1.nupkg.sha512"
86+
},
87+
"MediatR.Contracts/2.0.1": {
88+
"type": "package",
89+
"serviceable": true,
90+
"sha512": "sha512-FYv95bNT4UwcNA+G/J1oX5OpRiSUxteXaUt2BJbRSdRNiIUNbggJF69wy6mnk2wYToaanpdXZdCwVylt96MpwQ==",
91+
"path": "mediatr.contracts/2.0.1",
92+
"hashPath": "mediatr.contracts.2.0.1.nupkg.sha512"
93+
},
94+
"Microsoft.Extensions.DependencyInjection.Abstractions/8.0.0": {
95+
"type": "package",
96+
"serviceable": true,
97+
"sha512": "sha512-cjWrLkJXK0rs4zofsK4bSdg+jhDLTaxrkXu4gS6Y7MAlCvRyNNgwY/lJi5RDlQOnSZweHqoyvgvbdvQsRIW+hg==",
98+
"path": "microsoft.extensions.dependencyinjection.abstractions/8.0.0",
99+
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.8.0.0.nupkg.sha512"
100+
},
101+
"BeyondNetCode.Shell.Ddd/9.9.9-test": {
102+
"type": "project",
103+
"serviceable": false,
104+
"sha512": ""
105+
}
106+
}
107+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)