Skip to content

Commit 92e04bb

Browse files
committed
Initial commit - CompactifAI.Client NuGet package
Built with Claude Code by Anthropic
0 parents  commit 92e04bb

21 files changed

+2443
-0
lines changed

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master, develop ]
6+
pull_request:
7+
branches: [ main, master, develop ]
8+
9+
env:
10+
DOTNET_VERSION: '8.0.x'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v4
22+
with:
23+
dotnet-version: ${{ env.DOTNET_VERSION }}
24+
25+
- name: Restore dependencies
26+
run: dotnet restore CompactifAI.sln
27+
28+
- name: Build
29+
run: dotnet build CompactifAI.sln --no-restore --configuration Release
30+
31+
- name: Test
32+
run: dotnet test CompactifAI.sln --no-build --configuration Release --verbosity normal --collect:"XPlat Code Coverage" --results-directory ./coverage
33+
34+
- name: Upload coverage reports
35+
uses: codecov/codecov-action@v4
36+
with:
37+
directory: ./coverage
38+
fail_ci_if_error: false
39+
env:
40+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
41+
42+
pack:
43+
runs-on: ubuntu-latest
44+
needs: build
45+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
46+
47+
steps:
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
51+
- name: Setup .NET
52+
uses: actions/setup-dotnet@v4
53+
with:
54+
dotnet-version: ${{ env.DOTNET_VERSION }}
55+
56+
- name: Restore dependencies
57+
run: dotnet restore CompactifAI.sln
58+
59+
- name: Build
60+
run: dotnet build CompactifAI.sln --configuration Release --no-restore
61+
62+
- name: Pack
63+
run: dotnet pack src/CompactifAI.Client/CompactifAI.Client.csproj --configuration Release --no-build --output ./nupkg
64+
65+
- name: Upload NuGet package artifact
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: nuget-package
69+
path: ./nupkg/*.nupkg
70+
retention-days: 30

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
env:
8+
DOTNET_VERSION: '8.0.x'
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: ${{ env.DOTNET_VERSION }}
22+
23+
- name: Extract version from tag
24+
id: version
25+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
26+
27+
- name: Restore dependencies
28+
run: dotnet restore CompactifAI.sln
29+
30+
- name: Build
31+
run: dotnet build CompactifAI.sln --configuration Release --no-restore
32+
33+
- name: Test
34+
run: dotnet test CompactifAI.sln --configuration Release --no-build --verbosity normal
35+
36+
- name: Pack
37+
run: dotnet pack src/CompactifAI.Client/CompactifAI.Client.csproj --configuration Release --no-build --output ./nupkg /p:Version=${{ steps.version.outputs.VERSION }}
38+
39+
- name: Push to NuGet
40+
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
41+
42+
- name: Upload package to release
43+
uses: softprops/action-gh-release@v1
44+
with:
45+
files: ./nupkg/*.nupkg
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Build results
2+
[Dd]ebug/
3+
[Dd]ebugPublic/
4+
[Rr]elease/
5+
[Rr]eleases/
6+
x64/
7+
x86/
8+
[Ww][Ii][Nn]32/
9+
[Aa][Rr][Mm]/
10+
[Aa][Rr][Mm]64/
11+
bld/
12+
[Bb]in/
13+
[Oo]bj/
14+
[Oo]ut/
15+
[Ll]og/
16+
[Ll]ogs/
17+
18+
# Visual Studio
19+
.vs/
20+
*.suo
21+
*.user
22+
*.userosscache
23+
*.sln.docstates
24+
*.userprefs
25+
26+
# Rider
27+
.idea/
28+
*.sln.iml
29+
30+
# VS Code
31+
.vscode/
32+
33+
# NuGet
34+
*.nupkg
35+
*.snupkg
36+
**/[Pp]ackages/*
37+
!**/[Pp]ackages/build/
38+
project.lock.json
39+
project.fragment.lock.json
40+
artifacts/
41+
42+
# Test results
43+
[Tt]est[Rr]esult*/
44+
[Bb]uild[Ll]og.*
45+
*.trx
46+
*.Coverage
47+
*.coveragexml
48+
coverage/
49+
TestResults/
50+
51+
# Build artifacts
52+
msbuild.log
53+
msbuild.err
54+
msbuild.wrn
55+
56+
# macOS
57+
.DS_Store
58+
.AppleDouble
59+
.LSOverride
60+
61+
# Windows
62+
Thumbs.db
63+
ehthumbs.db
64+
Desktop.ini

CompactifAI.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompactifAI.Client", "src\CompactifAI.Client\CompactifAI.Client.csproj", "{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CompactifAI.Client.Tests", "tests\CompactifAI.Client.Tests\CompactifAI.Client.Tests.csproj", "{B2C3D4E5-F6A7-8901-BCDE-F12345678901}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17+
{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Debug|Any CPU.Build.0 = Debug|Any CPU
18+
{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.ActiveCfg = Release|Any CPU
19+
{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}.Release|Any CPU.Build.0 = Release|Any CPU
20+
{B2C3D4E5-F6A7-8901-BCDE-F12345678901}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21+
{B2C3D4E5-F6A7-8901-BCDE-F12345678901}.Debug|Any CPU.Build.0 = Debug|Any CPU
22+
{B2C3D4E5-F6A7-8901-BCDE-F12345678901}.Release|Any CPU.ActiveCfg = Release|Any CPU
23+
{B2C3D4E5-F6A7-8901-BCDE-F12345678901}.Release|Any CPU.Build.0 = Release|Any CPU
24+
EndGlobalSection
25+
EndGlobal

0 commit comments

Comments
 (0)