|
| 1 | +# GitHub Packages Setup Guide |
| 2 | + |
| 3 | +## 🔗 NuGet Paketlerini GitHub'a Bağlama |
| 4 | + |
| 5 | +DatalogySoftware GIS Framework paketleri hem **NuGet.org** hem de **GitHub Packages** üzerinden yayınlanmaktadır. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## 📦 Otomatik Yayınlama (GitHub Actions) |
| 10 | + |
| 11 | +### Mevcut Yapılandırma |
| 12 | + |
| 13 | +`.github/workflows/nuget-publish.yml` workflow'u bir tag push edildiğinde otomatik olarak: |
| 14 | + |
| 15 | +1. ✅ **NuGet.org**'a paketleri yayınlar |
| 16 | +2. ✅ **GitHub Packages**'a paketleri yayınlar |
| 17 | +3. ✅ GitHub Release oluşturur |
| 18 | + |
| 19 | +### Gerekli Secrets |
| 20 | + |
| 21 | +| Secret | Açıklama | Nereden Alınır | |
| 22 | +|--------|----------|----------------| |
| 23 | +| `NUGET_API_KEY` | NuGet.org API key | https://www.nuget.org/account/apikeys | |
| 24 | +| `GITHUB_TOKEN` | GitHub token | Otomatik sağlanır (Actions tarafından) | |
| 25 | + |
| 26 | +--- |
| 27 | + |
| 28 | +## 🔑 NuGet.org API Key Oluşturma |
| 29 | + |
| 30 | +### Adımlar: |
| 31 | + |
| 32 | +1. **NuGet.org'a Giriş Yapın** |
| 33 | + - https://www.nuget.org/account/apikeys |
| 34 | + |
| 35 | +2. **Create Butonuna Tıklayın** |
| 36 | + |
| 37 | +3. **Ayarları Yapın:** |
| 38 | + - **Key Name**: `DatalogySoftware-GIS-Framework-Publish` |
| 39 | + - **Scopes**: |
| 40 | + - ✅ Push (seçili olmalı) |
| 41 | + - ✅ Push new packages and package versions |
| 42 | + - **Glob Pattern**: `Datalogy.Gis.*` |
| 43 | + - **Expiration**: 365 days (1 yıl) |
| 44 | + |
| 45 | +4. **Generate Butonuna Tıklayın** |
| 46 | + |
| 47 | +5. **API Key'i Kopyalayın** (bir daha gösterilmeyecek!) |
| 48 | + |
| 49 | +### GitHub'a Ekleme: |
| 50 | + |
| 51 | +1. Repository'ye gidin: https://github.com/datlogysoftware/datalogyGIS |
| 52 | +2. **Settings** → **Secrets and variables** → **Actions** |
| 53 | +3. **New repository secret** butonuna tıklayın |
| 54 | +4. **Name**: `NUGET_API_KEY` |
| 55 | +5. **Secret**: Kopyaladığınız API key'i yapıştırın |
| 56 | +6. **Add secret** butonuna tıklayın |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +## 📥 Paket Kullanımı |
| 61 | + |
| 62 | +### Seçenek 1: NuGet.org'dan (Önerilen) |
| 63 | + |
| 64 | +```bash |
| 65 | +dotnet add package Datalogy.Gis.Core |
| 66 | +``` |
| 67 | + |
| 68 | +### Seçenek 2: GitHub Packages'dan |
| 69 | + |
| 70 | +#### A. Komut Satırı ile: |
| 71 | + |
| 72 | +```bash |
| 73 | +# GitHub Packages source'u ekle |
| 74 | +dotnet nuget add source https://nuget.pkg.github.com/datlogysoftware/index.json \ |
| 75 | + --name github \ |
| 76 | + --username YOUR_GITHUB_USERNAME \ |
| 77 | + --password YOUR_GITHUB_PAT \ |
| 78 | + --store-password-in-clear-text |
| 79 | + |
| 80 | +# Paketi yükle |
| 81 | +dotnet add package Datalogy.Gis.Core --source github |
| 82 | +``` |
| 83 | + |
| 84 | +#### B. nuget.config ile: |
| 85 | + |
| 86 | +Projenizin root klasörüne `nuget.config` dosyası oluşturun: |
| 87 | + |
| 88 | +```xml |
| 89 | +<?xml version="1.0" encoding="utf-8"?> |
| 90 | +<configuration> |
| 91 | + <packageSources> |
| 92 | + <!-- NuGet.org (varsayılan) --> |
| 93 | + <add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> |
| 94 | + |
| 95 | + <!-- GitHub Packages --> |
| 96 | + <add key="github" value="https://nuget.pkg.github.com/datlogysoftware/index.json" /> |
| 97 | + </packageSources> |
| 98 | + |
| 99 | + <packageSourceCredentials> |
| 100 | + <github> |
| 101 | + <add key="Username" value="YOUR_GITHUB_USERNAME" /> |
| 102 | + <add key="ClearTextPassword" value="YOUR_GITHUB_PAT" /> |
| 103 | + </github> |
| 104 | + </packageSourceCredentials> |
| 105 | +</configuration> |
| 106 | +``` |
| 107 | + |
| 108 | +**Not:** `YOUR_GITHUB_USERNAME` ve `YOUR_GITHUB_PAT` değerlerini kendi bilgilerinizle değiştirin. |
| 109 | + |
| 110 | +#### C. GitHub Personal Access Token (PAT) Oluşturma: |
| 111 | + |
| 112 | +1. https://github.com/settings/tokens/new adresine gidin |
| 113 | +2. **Note**: "NuGet Package Access" |
| 114 | +3. **Expiration**: 90 days veya istediğiniz süre |
| 115 | +4. **Scopes**: |
| 116 | + - ✅ `read:packages` - Paket okuma yetkisi |
| 117 | +5. **Generate token** butonuna tıklayın |
| 118 | +6. Token'i kopyalayın ve güvenli bir yerde saklayın |
| 119 | + |
| 120 | +--- |
| 121 | + |
| 122 | +## 🚀 Yeni Release Yayınlama |
| 123 | + |
| 124 | +### Manuel Yayınlama: |
| 125 | + |
| 126 | +```bash |
| 127 | +# Main branch'e geç |
| 128 | +git checkout main |
| 129 | +git pull origin main |
| 130 | + |
| 131 | +# Tag oluştur (örnek: v3.0.1) |
| 132 | +git tag -a v3.0.1 -m "Release v3.0.1 - Bug fixes and improvements" |
| 133 | + |
| 134 | +# Tag'i push et |
| 135 | +git push origin v3.0.1 |
| 136 | +``` |
| 137 | + |
| 138 | +GitHub Actions otomatik olarak: |
| 139 | +1. Tüm paketleri derler |
| 140 | +2. NuGet.org'a yayınlar |
| 141 | +3. GitHub Packages'a yayınlar |
| 142 | +4. GitHub Release oluşturur |
| 143 | + |
| 144 | +### Workflow Durumunu Kontrol: |
| 145 | + |
| 146 | +```bash |
| 147 | +# Workflow'u izle |
| 148 | +gh run list --workflow=nuget-publish.yml --limit 5 |
| 149 | + |
| 150 | +# Belirli bir run'ı izle |
| 151 | +gh run watch RUN_ID |
| 152 | +``` |
| 153 | + |
| 154 | +--- |
| 155 | + |
| 156 | +## 🔍 Yayınlanan Paketleri Kontrol Etme |
| 157 | + |
| 158 | +### NuGet.org: |
| 159 | +- https://www.nuget.org/packages/Datalogy.Gis.Core |
| 160 | +- https://www.nuget.org/packages/Datalogy.Gis.Domain |
| 161 | +- vs. |
| 162 | + |
| 163 | +### GitHub Packages: |
| 164 | +- https://github.com/orgs/datlogysoftware/packages?repo_name=datalogyGIS |
| 165 | + |
| 166 | +### GitHub Releases: |
| 167 | +- https://github.com/datlogysoftware/datalogyGIS/releases |
| 168 | + |
| 169 | +--- |
| 170 | + |
| 171 | +## ⚠️ Sorun Giderme |
| 172 | + |
| 173 | +### "401 Unauthorized" Hatası (NuGet.org) |
| 174 | + |
| 175 | +**Neden:** `NUGET_API_KEY` eksik veya hatalı |
| 176 | + |
| 177 | +**Çözüm:** |
| 178 | +1. GitHub repo → Settings → Secrets → Actions |
| 179 | +2. `NUGET_API_KEY` kontrolü yap |
| 180 | +3. Gerekirse yeni API key oluştur ve güncelle |
| 181 | + |
| 182 | +### "401 Unauthorized" Hatası (GitHub Packages) |
| 183 | + |
| 184 | +**Neden:** `GITHUB_TOKEN` izinleri yetersiz |
| 185 | + |
| 186 | +**Çözüm:** |
| 187 | +1. Repository Settings → Actions → General |
| 188 | +2. Workflow permissions → "Read and write permissions" seç |
| 189 | +3. "Allow GitHub Actions to create and approve pull requests" işaretle |
| 190 | +4. Save |
| 191 | + |
| 192 | +### Paket Bulunamıyor (GitHub Packages) |
| 193 | + |
| 194 | +**Neden:** Repository private olabilir veya PAT yetersiz |
| 195 | + |
| 196 | +**Çözüm:** |
| 197 | +1. Repository'nin public olduğundan emin olun |
| 198 | +2. PAT'ın `read:packages` iznine sahip olduğunu kontrol edin |
| 199 | +3. nuget.config'de username ve PAT'ın doğru olduğundan emin olun |
| 200 | + |
| 201 | +--- |
| 202 | + |
| 203 | +## 📊 Mevcut Durum |
| 204 | + |
| 205 | +| Platform | Status | URL | |
| 206 | +|----------|--------|-----| |
| 207 | +| **NuGet.org** | ⏳ Beklemede | https://www.nuget.org/profiles/DatalogySoftware | |
| 208 | +| **GitHub Packages** | ✅ Hazır | https://github.com/orgs/datlogysoftware/packages | |
| 209 | +| **GitHub Releases** | ✅ v3.0.0-preview | https://github.com/datlogysoftware/datalogyGIS/releases | |
| 210 | + |
| 211 | +**Not:** NuGet.org yayını için `NUGET_API_KEY` secret'ının eklenmesi bekleniyor. |
| 212 | + |
| 213 | +--- |
| 214 | + |
| 215 | +## 📞 Destek |
| 216 | + |
| 217 | +Sorularınız için: |
| 218 | +- **Issues**: https://github.com/datlogysoftware/datalogyGIS/issues |
| 219 | + |
| 220 | +- **Website**: https://www.datalogysoft.com |
| 221 | + |
| 222 | +--- |
| 223 | + |
| 224 | +**Son Güncelleme:** 2025-11-09 |
| 225 | +**Framework Version:** v3.0.0-preview |
0 commit comments