diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 79bf573..8d74243 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -8,13 +8,6 @@
"csharpier"
],
"rollForward": false
- },
- "Intility.DotnetApiDocs": {
- "version": "0.1.5",
- "commands": [
- "dotnet-api-docs"
- ],
- "rollForward": false
}
}
}
diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml
index fa31e52..341d382 100644
--- a/.github/workflows/ci-cd.yml
+++ b/.github/workflows/ci-cd.yml
@@ -21,7 +21,6 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
- packages: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -30,9 +29,6 @@ jobs:
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
dotnet-version: 10.0.x
- source-url: https://nuget.pkg.github.com/Intility/index.json
- env:
- NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Restore
run: dotnet restore --locked-mode
@@ -50,7 +46,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
- packages: write
+ id-token: write # OIDC token for NuGet trusted publishing
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -59,9 +55,6 @@ jobs:
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
with:
dotnet-version: 10.0.x
- source-url: https://nuget.pkg.github.com/Intility/index.json
- env:
- NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Restore
run: dotnet restore --locked-mode
@@ -69,6 +62,15 @@ jobs:
- name: Build and Pack
run: dotnet pack JsonApiToolkit/JsonApiToolkit.csproj -c Release --no-restore
- - name: Publish to GitHub Packages
- run: dotnet nuget push "JsonApiToolkit/bin/Release/*.nupkg" --api-key ${{
- secrets.GITHUB_TOKEN }}
+ # Exchange OIDC token for a short-lived NuGet API key
+ - name: NuGet login
+ id: login
+ uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
+ with:
+ user: ${{ secrets.NUGET_USER }}
+
+ - name: Publish to NuGet.org
+ run: dotnet nuget push "JsonApiToolkit/bin/Release/*.nupkg"
+ --source https://api.nuget.org/v3/index.json
+ --api-key ${{ steps.login.outputs.NUGET_API_KEY }}
+ --skip-duplicate
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 42f3c10..017b626 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -73,14 +73,13 @@ jobs:
run: dotnet build JsonApiToolkit/JsonApiToolkit.csproj -c Release -o
JsonApiToolkit/bin/docs
- - name: Restore .NET tools
+ - name: Install Intility.DotnetApiDocs
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: dotnet tool restore
+ run: dotnet tool install -g Intility.DotnetApiDocs --version 0.1.5
- name: Generate API reference
- run: dotnet tool run dotnet-api-docs -- --input JsonApiToolkit/bin/docs --output
- docs/api --strict
+ run: dotnet-api-docs --input JsonApiToolkit/bin/docs --output docs/api --strict
- name: Install Python dependencies
run: uv venv && uv pip install -r docs/requirements.txt
diff --git a/JsonApiToolkit/JsonApiToolkit.csproj b/JsonApiToolkit/JsonApiToolkit.csproj
index 97c51e0..79c4481 100644
--- a/JsonApiToolkit/JsonApiToolkit.csproj
+++ b/JsonApiToolkit/JsonApiToolkit.csproj
@@ -9,10 +9,11 @@
2.1.1
Intility
Intility
- A toolkit for implementing JSON:API specification in .NET applications
- jsonapi;api;rest;dotnet
+ Build JSON:API endpoints in ASP.NET Core. Translates JSON:API query parameters (filter, sort, include, fields, page) into typed EF Core queries and returns spec-compliant response documents.
+ jsonapi;json-api;aspnetcore;efcore;rest;api;dotnet
https://github.com/intility/json-api-toolkit
git
+ https://github.com/intility/json-api-toolkit
README.md
MIT