Skip to content

Commit 45066d4

Browse files
committed
chore: first commit
0 parents  commit 45066d4

42 files changed

Lines changed: 1749 additions & 0 deletions

Some content is hidden

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

.editorconfig

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
root = true
2+
3+
# All files
4+
[*]
5+
charset = utf-8
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
indent_style = space
9+
10+
# Code files
11+
[*.{cs,csx}]
12+
indent_size = 4
13+
end_of_line = lf
14+
15+
# XML project files
16+
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
17+
indent_size = 2
18+
19+
# XML config files
20+
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
21+
indent_size = 2
22+
23+
# JSON files
24+
[*.json]
25+
indent_size = 2
26+
27+
# YAML files
28+
[*.{yml,yaml}]
29+
indent_size = 2
30+
31+
# Markdown files
32+
[*.md]
33+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
* text=auto
2+
*.cs text diff=csharp
3+
*.csproj text diff=xml
4+
*.sln text eol=crlf
5+
*.yml text
6+
*.yaml text
7+
*.md text
8+
*.sh text eol=lf
9+
*.sln text eol=crlf
10+
*.dll binary
11+
*.snupkg binary
12+
*.nupkg binary

.github/dependabot.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
version: 2
2+
updates:
3+
# NuGet dependencies
4+
- package-ecosystem: 'nuget'
5+
directory: '/'
6+
schedule:
7+
interval: 'weekly'
8+
day: 'monday'
9+
time: '09:00'
10+
open-pull-requests-limit: 3
11+
versioning-strategy: 'auto'
12+
labels:
13+
- 'dependencies'
14+
- 'nuget'
15+
reviewers:
16+
- 'DoubledDoge'
17+
assignees:
18+
- 'DoubledDoge'
19+
groups:
20+
nuget-dependencies:
21+
patterns:
22+
- '*'
23+
update-types:
24+
- 'minor'
25+
- 'patch'
26+
- 'major'
27+
commit-message:
28+
prefix: 'chore'
29+
30+
# GitHub Actions
31+
- package-ecosystem: 'github-actions'
32+
directory: '/'
33+
schedule:
34+
interval: 'weekly'
35+
day: 'monday'
36+
time: '09:00'
37+
labels:
38+
- 'dependencies'
39+
- 'github-actions'
40+
reviewers:
41+
- 'DoubledDoge'
42+
assignees:
43+
- 'DoubledDoge'
44+
groups:
45+
actions-updates:
46+
patterns:
47+
- '*'
48+
update-types:
49+
- 'minor'
50+
- 'patch'
51+
- 'major'
52+
commit-message:
53+
prefix: 'chore'
54+
55+

.github/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
- dependencies
6+
categories:
7+
- title: 🚀 Features
8+
labels:
9+
- feature
10+
- enhancement
11+
- feat
12+
- title: 🐛 Bug Fixes
13+
labels:
14+
- bug
15+
- fix
16+
- title: 📚 Documentation
17+
labels:
18+
- documentation
19+
- docs
20+
- title: 🎨 Styling & Theming
21+
labels:
22+
- style
23+
- theme
24+
- title: Performance
25+
labels:
26+
- performance
27+
- perf
28+
- title: 🧹 Maintenance
29+
labels:
30+
- chore
31+
- refactor
32+
- title: Other Changes
33+
labels:
34+
- "*"
35+
template: |
36+
## What's Changed
37+
38+
{{#each categories}}
39+
{{#if changes.[this.title]}}
40+
### {{this.title}}

.github/workflows/ci-cd.yml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
name: .NET CI-CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'src/**'
8+
- '**/*.csproj'
9+
- '**/*.sln'
10+
- '.github/workflows/ci-cd.yml'
11+
pull_request:
12+
branches: [ main ]
13+
paths:
14+
- 'src/**'
15+
- '**/*.csproj'
16+
- '**/*.sln'
17+
18+
env:
19+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
20+
DOTNET_CLI_TELEMETRY_OPTOUT: true
21+
DOTNET_NOLOGO: true
22+
23+
jobs:
24+
build-and-test:
25+
name: Build & Test
26+
runs-on: ubuntu-latest
27+
permissions:
28+
contents: read
29+
pull-requests: write
30+
31+
steps:
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0
36+
37+
- name: Setup .NET
38+
uses: actions/setup-dotnet@v4
39+
with:
40+
dotnet-version: 9.0.x
41+
42+
- name: Cache NuGet packages
43+
uses: actions/cache@v4
44+
with:
45+
path: ~/.nuget/packages
46+
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
47+
restore-keys: |
48+
${{ runner.os }}-nuget-
49+
50+
- name: Restore dependencies
51+
run: dotnet restore
52+
53+
- name: Build library
54+
run: dotnet build --configuration Release --no-restore
55+
56+
- name: Detect test projects
57+
id: detect_tests
58+
run: |
59+
found=false
60+
# Look for explicit IsTestProject flag
61+
if grep -R --include="*.csproj" -l "<IsTestProject>true</IsTestProject>" . >/dev/null 2>&1; then
62+
found=true
63+
fi
64+
# Also detect common test SDK package usage
65+
if [ "$found" = "false" ] && grep -R --include="*.csproj" -l "Microsoft.NET.Test.Sdk" . >/dev/null 2>&1; then
66+
found=true
67+
fi
68+
echo "found=$found" >> $GITHUB_OUTPUT
69+
70+
- name: Run tests
71+
if: steps.detect_tests.outputs.found == 'true'
72+
run: |
73+
dotnet test --configuration Release --no-build --verbosity normal \
74+
--logger "trx;LogFileName=test-results.trx" \
75+
--results-directory ./test-results
76+
77+
- name: Test Report
78+
if: always() && steps.detect_tests.outputs.found == 'true'
79+
uses: dorny/test-reporter@v1
80+
with:
81+
name: Test Results
82+
path: "test-results/*.trx"
83+
reporter: dotnet-trx
84+
fail-on-error: true
85+
86+
validate-package:
87+
name: Validate Package Metadata
88+
runs-on: ubuntu-latest
89+
needs: build-and-test
90+
permissions:
91+
contents: read
92+
93+
steps:
94+
- name: Checkout repository
95+
uses: actions/checkout@v4
96+
97+
- name: Setup .NET
98+
uses: actions/setup-dotnet@v4
99+
with:
100+
dotnet-version: 9.0.x
101+
102+
- name: Restore dependencies
103+
run: dotnet restore
104+
105+
- name: Build library
106+
run: dotnet build --configuration Release --no-restore
107+
108+
- name: Pack for validation
109+
run: dotnet pack --configuration Release --no-build --output ./artifacts
110+
111+
- name: Validate README exists
112+
run: |
113+
if [ ! -f "README.md" ]; then
114+
echo "❌ README.md is missing!"
115+
exit 1
116+
fi
117+
echo "✅ README.md found"
118+
119+
- name: Validate LICENSE exists
120+
run: |
121+
if [ ! -f "LICENSE" ]; then
122+
echo "❌ LICENSE file is missing!"
123+
exit 1
124+
fi
125+
echo "✅ LICENSE found"
126+
127+
- name: Display package info
128+
run: |
129+
echo "📦 Package validation successful"
130+
ls -lh ./artifacts/

.github/workflows/codeql.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CodeQL for C# Project
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'src/**'
8+
- '**/*.csproj'
9+
- '**/*.sln'
10+
- '.github/workflows/codeql.yml'
11+
pull_request:
12+
branches: [ main ]
13+
paths:
14+
- 'src/**'
15+
- '**/*.csproj'
16+
- '**/*.sln'
17+
schedule:
18+
- cron: '40 4 * * 6'
19+
20+
jobs:
21+
analyze:
22+
name: Analyze (${{ matrix.language }})
23+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
24+
permissions:
25+
security-events: write
26+
packages: read
27+
actions: read
28+
contents: read
29+
30+
strategy:
31+
fail-fast: false
32+
matrix:
33+
include:
34+
- language: csharp
35+
build-mode: autobuild
36+
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v4
40+
41+
- name: Setup .NET
42+
uses: actions/setup-dotnet@v4
43+
with:
44+
dotnet-version: '9.0.x'
45+
46+
- name: Initialize CodeQL
47+
uses: github/codeql-action/init@v3
48+
with:
49+
languages: ${{ matrix.language }}
50+
build-mode: ${{ matrix.build-mode }}
51+
52+
- if: matrix.build-mode == 'manual'
53+
shell: bash
54+
run: |
55+
echo 'If you are using a "manual" build mode for one or more of the' \
56+
'languages you are analyzing, replace this with the commands to build' \
57+
'your code, for example:'
58+
echo ' make bootstrap'
59+
echo ' make release'
60+
exit 1
61+
62+
- name: Perform CodeQL Analysis
63+
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)