Skip to content

Commit 81d207d

Browse files
feat: Add GitHub Packages support for NuGet distribution
- Add GitHub Packages publishing step to nuget-publish workflow - Update README with GitHub Packages installation instructions - Configure dual publishing: NuGet.org + GitHub Packages - Add nuget.config example for GitHub Packages authentication This allows users to install packages from both NuGet.org and GitHub Packages. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 3a74426 commit 81d207d

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/nuget-publish.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ jobs:
162162
--source https://api.nuget.org/v3/index.json \
163163
--skip-duplicate
164164
165+
- name: Publish to GitHub Packages
166+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
167+
run: |
168+
dotnet nuget push "./packages/*.nupkg" \
169+
--api-key ${{ secrets.GITHUB_TOKEN }} \
170+
--source https://nuget.pkg.github.com/datlogysoftware/index.json \
171+
--skip-duplicate
172+
165173
- name: Create GitHub Release
166174
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
167175
uses: softprops/action-gh-release@v1

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ DatalogySoftware GIS Framework is a modern, high-performance geospatial data pro
2929

3030
### Installation
3131

32+
#### From NuGet.org (Recommended)
33+
3234
Install the core package via NuGet:
3335

3436
```bash
@@ -49,6 +51,40 @@ dotnet add package Datalogy.Gis.Data.Postgres
4951
dotnet add package Datalogy.Gis.Data.CosmosDb
5052
```
5153

54+
#### From GitHub Packages
55+
56+
Add GitHub Packages as a NuGet source:
57+
58+
```bash
59+
# Add GitHub Packages source
60+
dotnet nuget add source https://nuget.pkg.github.com/datlogysoftware/index.json \
61+
--name github \
62+
--username YOUR_GITHUB_USERNAME \
63+
--password YOUR_GITHUB_PAT \
64+
--store-password-in-clear-text
65+
66+
# Install packages
67+
dotnet add package Datalogy.Gis.Core --source github
68+
```
69+
70+
Or configure in `nuget.config`:
71+
72+
```xml
73+
<?xml version="1.0" encoding="utf-8"?>
74+
<configuration>
75+
<packageSources>
76+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
77+
<add key="github" value="https://nuget.pkg.github.com/datlogysoftware/index.json" />
78+
</packageSources>
79+
<packageSourceCredentials>
80+
<github>
81+
<add key="Username" value="YOUR_GITHUB_USERNAME" />
82+
<add key="ClearTextPassword" value="YOUR_GITHUB_PAT" />
83+
</github>
84+
</packageSourceCredentials>
85+
</configuration>
86+
```
87+
5288
### Basic Usage
5389

5490
```csharp

0 commit comments

Comments
 (0)