Skip to content

Commit b0e515e

Browse files
vkuttypCopilot
andcommitted
feat: add NuGet metadata and publish workflow
- Added PackageId, Description, Tags, License, Readme to all 5 src csproj files - Created .github/workflows/nuget.yml (tag-triggered: v*.*.*) - Pack uses version extracted from git tag (strip 'v' prefix) - Uses NUGET_API_KEY secret with --skip-duplicate flag Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent af20918 commit b0e515e

6 files changed

Lines changed: 154 additions & 2 deletions

File tree

.github/workflows/nuget.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Publish to NuGet
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
publish:
10+
name: Pack & Push
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup .NET 10
18+
uses: actions/setup-dotnet@v4
19+
with:
20+
dotnet-version: '10.0.x'
21+
22+
- name: Restore
23+
run: dotnet restore
24+
25+
- name: Build
26+
run: dotnet build --no-restore -c Release
27+
28+
# Strip leading 'v' from tag (v1.1.0 → 1.1.0)
29+
- name: Extract version
30+
id: version
31+
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
32+
33+
- name: Pack
34+
run: |
35+
dotnet pack src/SqlDotnetty.Core/SqlDotnetty.Core.csproj \
36+
-c Release --no-build \
37+
-p:Version=${{ steps.version.outputs.VERSION }} \
38+
-o ./nupkgs
39+
40+
dotnet pack src/SqlDotnetty.MsSql/SqlDotnetty.MsSql.csproj \
41+
-c Release --no-build \
42+
-p:Version=${{ steps.version.outputs.VERSION }} \
43+
-o ./nupkgs
44+
45+
dotnet pack src/SqlDotnetty.Postgres/SqlDotnetty.Postgres.csproj \
46+
-c Release --no-build \
47+
-p:Version=${{ steps.version.outputs.VERSION }} \
48+
-o ./nupkgs
49+
50+
dotnet pack src/SqlDotnetty.MySql/SqlDotnetty.MySql.csproj \
51+
-c Release --no-build \
52+
-p:Version=${{ steps.version.outputs.VERSION }} \
53+
-o ./nupkgs
54+
55+
dotnet pack src/SqlDotnetty.Sqlite/SqlDotnetty.Sqlite.csproj \
56+
-c Release --no-build \
57+
-p:Version=${{ steps.version.outputs.VERSION }} \
58+
-o ./nupkgs
59+
60+
ls -la ./nupkgs
61+
62+
- name: Push to NuGet
63+
run: |
64+
dotnet nuget push ./nupkgs/*.nupkg \
65+
--api-key ${{ secrets.NUGET_API_KEY }} \
66+
--source https://api.nuget.org/v3/index.json \
67+
--skip-duplicate

src/SqlDotnetty.Core/SqlDotnetty.Core.csproj

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@
66
<RootNamespace>CosmoSQLClient.Core</RootNamespace>
77
<ImplicitUsings>enable</ImplicitUsings>
88
<Nullable>enable</Nullable>
9+
10+
<PackageId>CosmoSQLClient.Core</PackageId>
11+
<Version>1.1.0</Version>
12+
<Authors>Veeran Puthumkara</Authors>
13+
<Description>Shared core types and interfaces for CosmoSQLClient — a unified .NET database driver for MSSQL, PostgreSQL, MySQL and SQLite using DotNetty.</Description>
14+
<PackageTags>sql;mssql;postgres;mysql;sqlite;database;driver;dotnetty;nio</PackageTags>
15+
<PackageProjectUrl>https://github.com/vkuttyp/CosmoSQLClient-Dotnet</PackageProjectUrl>
16+
<RepositoryUrl>https://github.com/vkuttyp/CosmoSQLClient-Dotnet</RepositoryUrl>
17+
<RepositoryType>git</RepositoryType>
18+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
19+
<PackageReadmeFile>README.md</PackageReadmeFile>
20+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
21+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
922
</PropertyGroup>
1023

24+
<ItemGroup>
25+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
26+
</ItemGroup>
27+
1128
</Project>

src/SqlDotnetty.MsSql/SqlDotnetty.MsSql.csproj

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@
1818
<RootNamespace>CosmoSQLClient.MsSql</RootNamespace>
1919
<ImplicitUsings>enable</ImplicitUsings>
2020
<Nullable>enable</Nullable>
21+
22+
<PackageId>CosmoSQLClient.MsSql</PackageId>
23+
<Version>1.1.0</Version>
24+
<Authors>Veeran Puthumkara</Authors>
25+
<Description>Microsoft SQL Server driver for CosmoSQLClient — TDS 7.4 wire protocol from scratch using DotNetty. Supports TLS, Windows/SQL auth, stored procedures and connection pooling.</Description>
26+
<PackageTags>sql;mssql;sqlserver;tds;database;driver;dotnetty;nio</PackageTags>
27+
<PackageProjectUrl>https://github.com/vkuttyp/CosmoSQLClient-Dotnet</PackageProjectUrl>
28+
<RepositoryUrl>https://github.com/vkuttyp/CosmoSQLClient-Dotnet</RepositoryUrl>
29+
<RepositoryType>git</RepositoryType>
30+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
31+
<PackageReadmeFile>README.md</PackageReadmeFile>
32+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
33+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2134
</PropertyGroup>
2235

36+
<ItemGroup>
37+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
38+
</ItemGroup>
39+
2340
</Project>

src/SqlDotnetty.MySql/SqlDotnetty.MySql.csproj

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<ItemGroup>
44
<ProjectReference Include="..\SqlDotnetty.Core\SqlDotnetty.Core.csproj" />
@@ -18,6 +18,23 @@
1818
<RootNamespace>CosmoSQLClient.MySql</RootNamespace>
1919
<ImplicitUsings>enable</ImplicitUsings>
2020
<Nullable>enable</Nullable>
21+
22+
<PackageId>CosmoSQLClient.MySql</PackageId>
23+
<Version>1.1.0</Version>
24+
<Authors>Veeran Puthumkara</Authors>
25+
<Description>MySQL driver for CosmoSQLClient — MySQL v10 wire protocol using DotNetty. Supports mysql_native_password, caching_sha2_password auth and connection pooling.</Description>
26+
<PackageTags>sql;mysql;mariadb;database;driver;dotnetty;nio</PackageTags>
27+
<PackageProjectUrl>https://github.com/vkuttyp/CosmoSQLClient-Dotnet</PackageProjectUrl>
28+
<RepositoryUrl>https://github.com/vkuttyp/CosmoSQLClient-Dotnet</RepositoryUrl>
29+
<RepositoryType>git</RepositoryType>
30+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
31+
<PackageReadmeFile>README.md</PackageReadmeFile>
32+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
33+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2134
</PropertyGroup>
2235

36+
<ItemGroup>
37+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
38+
</ItemGroup>
39+
2340
</Project>

src/SqlDotnetty.Postgres/SqlDotnetty.Postgres.csproj

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,23 @@
1818
<RootNamespace>CosmoSQLClient.Postgres</RootNamespace>
1919
<ImplicitUsings>enable</ImplicitUsings>
2020
<Nullable>enable</Nullable>
21+
22+
<PackageId>CosmoSQLClient.Postgres</PackageId>
23+
<Version>1.1.0</Version>
24+
<Authors>Veeran Puthumkara</Authors>
25+
<Description>PostgreSQL driver for CosmoSQLClient — PostgreSQL v3 wire protocol using DotNetty. Supports SCRAM-SHA-256 auth, TLS and connection pooling.</Description>
26+
<PackageTags>sql;postgres;postgresql;database;driver;dotnetty;nio</PackageTags>
27+
<PackageProjectUrl>https://github.com/vkuttyp/CosmoSQLClient-Dotnet</PackageProjectUrl>
28+
<RepositoryUrl>https://github.com/vkuttyp/CosmoSQLClient-Dotnet</RepositoryUrl>
29+
<RepositoryType>git</RepositoryType>
30+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
31+
<PackageReadmeFile>README.md</PackageReadmeFile>
32+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
33+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2134
</PropertyGroup>
2235

36+
<ItemGroup>
37+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
38+
</ItemGroup>
39+
2340
</Project>

src/SqlDotnetty.Sqlite/SqlDotnetty.Sqlite.csproj

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<ItemGroup>
44
<ProjectReference Include="..\SqlDotnetty.Core\SqlDotnetty.Core.csproj" />
@@ -14,6 +14,23 @@
1414
<RootNamespace>CosmoSQLClient.Sqlite</RootNamespace>
1515
<ImplicitUsings>enable</ImplicitUsings>
1616
<Nullable>enable</Nullable>
17+
18+
<PackageId>CosmoSQLClient.Sqlite</PackageId>
19+
<Version>1.1.0</Version>
20+
<Authors>Veeran Puthumkara</Authors>
21+
<Description>SQLite driver for CosmoSQLClient — wraps Microsoft.Data.Sqlite behind the unified ISqlDatabase interface with connection pooling support.</Description>
22+
<PackageTags>sql;sqlite;database;driver;dotnetty;nio</PackageTags>
23+
<PackageProjectUrl>https://github.com/vkuttyp/CosmoSQLClient-Dotnet</PackageProjectUrl>
24+
<RepositoryUrl>https://github.com/vkuttyp/CosmoSQLClient-Dotnet</RepositoryUrl>
25+
<RepositoryType>git</RepositoryType>
26+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
27+
<PackageReadmeFile>README.md</PackageReadmeFile>
28+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
29+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1730
</PropertyGroup>
1831

32+
<ItemGroup>
33+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
34+
</ItemGroup>
35+
1936
</Project>

0 commit comments

Comments
 (0)