Skip to content

Commit 16a463f

Browse files
committed
Updated nuget gha.
1 parent e6b9316 commit 16a463f

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

.github/workflows/nuget.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Good. The full updated file to put in your PR:
2+
3+
```yaml
14
name: Publish to Nuget
25
36
on:
@@ -19,21 +22,25 @@ jobs:
1922
#- name: Unit tests
2023
# run: dotnet test test/unit/SIPSorcery.UnitTests.csproj --framework net10.0 -c Release
2124
25+
# Build all libs first (dotnet pack does not build by default)
26+
- name: Build
27+
run: dotnet build Libraries.slnf -c Release
28+
2229
# Pack all NuGet packages (Windows can build all target frameworks incl. net462 and net10.0-windows)
2330
- name: Pack SIPSorcery
24-
run: dotnet pack src/SIPSorcery/SIPSorcery.csproj -c Release -o ./artifacts
31+
run: dotnet pack src/SIPSorcery/SIPSorcery.csproj -c Release --no-build -o ./artifacts
2532
2633
- name: Pack SIPSorceryMedia.Abstractions
27-
run: dotnet pack src/SIPSorceryMedia.Abstractions/SIPSorceryMedia.Abstractions.csproj -c Release -o ./artifacts
34+
run: dotnet pack src/SIPSorceryMedia.Abstractions/SIPSorceryMedia.Abstractions.csproj -c Release --no-build -o ./artifacts
2835
2936
- name: Pack SIPSorceryMedia.FFmpeg
30-
run: dotnet pack src/SIPSorceryMedia.FFmpeg/SIPSorceryMedia.FFmpeg.csproj -c Release -o ./artifacts
37+
run: dotnet pack src/SIPSorceryMedia.FFmpeg/SIPSorceryMedia.FFmpeg.csproj -c Release --no-build -o ./artifacts
3138
3239
- name: Pack SIPSorceryMedia.Windows
33-
run: dotnet pack src/SIPSorceryMedia.Windows/SIPSorceryMedia.Windows.csproj -c Release -o ./artifacts
40+
run: dotnet pack src/SIPSorceryMedia.Windows/SIPSorceryMedia.Windows.csproj -c Release --no-build -o ./artifacts
3441
3542
- name: Pack SIPSorcery.OpenAI.Realtime
36-
run: dotnet pack src/SIPSorcery.OpenAI.Realtime/SIPSorcery.OpenAI.Realtime.csproj -c Release -o ./artifacts
43+
run: dotnet pack src/SIPSorcery.OpenAI.Realtime/SIPSorcery.OpenAI.Realtime.csproj -c Release --no-build -o ./artifacts
3744
3845
# Publish to NuGet (only on tag pushes)
3946
- name: Publish all packages to NuGet
@@ -44,4 +51,9 @@ jobs:
4451
dotnet nuget push ./artifacts/*.nupkg `
4552
--source https://api.nuget.org/v3/index.json `
4653
--api-key $env:NUGET_API_KEY `
47-
--skip-duplicate
54+
--skip-duplicate
55+
```
56+
57+
The key changes from before:
58+
- Added explicit `dotnet build Libraries.slnf -c Release` step before packing
59+
- Added `--no-build` to all `dotnet pack` steps so they use the already-built output rather than trying to build again

0 commit comments

Comments
 (0)