Skip to content

Commit d388485

Browse files
paulirwinclaude
andauthored
Add NuGet package packing and artifact upload to CI workflow (#45)
## Summary - Automatically pack NuGet packages on successful builds - Upload packages as artifacts for easy download from build details page - Only runs on non-PR builds and Windows builds to avoid duplication ## Test plan - [ ] Verify NuGet packages are packed and uploaded on successful main/develop branch builds - [x] Verify the step is skipped on pull request builds - [x] Verify the step is skipped on Ubuntu and macOS builds - [ ] Download artifacts from a successful build and verify package contents 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent a484313 commit d388485

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/dotnet.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,13 @@ jobs:
2929
run: dotnet build --no-restore
3030
- name: Test
3131
run: dotnet test --no-build --verbosity normal
32+
- name: Pack NuGet packages
33+
if: github.event_name != 'pull_request' && matrix.os == 'windows-latest'
34+
run: dotnet pack --no-build --output nupkgs
35+
- name: Upload NuGet packages
36+
if: github.event_name != 'pull_request' && matrix.os == 'windows-latest'
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: nuget-packages
40+
path: nupkgs/
41+
retention-days: 30

0 commit comments

Comments
 (0)