Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: CI - Build, Test, and Publish

permissions:
contents: read

on:
push:
branches: main
pull_request:
branches: main

jobs:
dotnet-sdk:
name: .NET SDK
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
working-directory: ./src

strategy:
matrix:
dotnet-version: ["8.0.x"]

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for nbgv to calculate version

- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet-version }}

- name: Setup Nerdbank.GitVersioning
uses: dotnet/nbgv@master
with:
setAllVars: true

- name: Restore source dependencies
run: dotnet restore dirs.proj

- name: Restore test dependencies
run: dotnet restore tests.proj

- name: Build source projects
run: dotnet build dirs.proj --no-restore --configuration Release

- name: Build test projects
run: dotnet build tests.proj --no-restore --configuration Release

- name: Run tests
run: dotnet test tests.proj --no-build --configuration Release --verbosity normal

- name: Pack NuGet packages
id: pack
continue-on-error: true
run: dotnet pack dirs.proj --configuration Release --output ../NuGetPackages

- name: Verify package was created
run: |
if ! ls ../NuGetPackages/*.nupkg 1> /dev/null 2>&1; then
echo "Error: No package file was created"
exit 1
fi
echo "✅ Package created successfully (NU5017 is a known false positive with centralized package management)"
ls -lh ../NuGetPackages/*.nupkg

- name: Copy NuGet packages
run: |
mkdir -p ~/drop/dotnet/NuGetPackages && cp -v ../NuGetPackages/*.nupkg $_

- name: Upload NuGet packages as artifact
uses: actions/upload-artifact@v4
with:
name: dotnet-packages-${{ github.run_number }}
path: ~/drop/dotnet/NuGetPackages/*
73 changes: 73 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
## A streamlined .gitignore for modern .NET projects
## including temporary files, build results, and
## files generated by popular .NET tools. If you are
## developing with Visual Studio, the VS .gitignore
## https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
## has more thorough IDE-specific entries.
##
## Get latest from https://github.com/github/gitignore/blob/main/Dotnet.gitignore

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
lib/

# Locally built Nuget package cache file
.lastbuild

# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/

# ASP.NET Scaffolding
ScaffoldingReadMe.txt

# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg

# Others
~$*
*~
CodeCoverage/

# MSBuild Binary and Structured Log
*.
*.log

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# Visual Studio
.vs/

# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml


# We should have at some point .vscode, but for not ignore since we don't have standard
.vscode
.claude/
**/.claude/
.idea/

# OS-specific files
.DS_Store
Thumbs.db
Loading
Loading