From 2f41189e4f55529428a3169f3f1683f38cecfa6c Mon Sep 17 00:00:00 2001 From: Erlend Ellefsen Date: Fri, 8 May 2026 10:48:23 +0200 Subject: [PATCH 1/4] chore: stage workflow + package changes for OSS public flip --- .github/workflows/ci-cd.yml | 24 +++++++++++++----------- JsonApiToolkit/JsonApiToolkit.csproj | 5 +++-- 2 files changed, 16 insertions(+), 13 deletions(-) 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/JsonApiToolkit/JsonApiToolkit.csproj b/JsonApiToolkit/JsonApiToolkit.csproj index 79005af..a1fa49d 100644 --- a/JsonApiToolkit/JsonApiToolkit.csproj +++ b/JsonApiToolkit/JsonApiToolkit.csproj @@ -9,10 +9,11 @@ 2.1.0 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 From d05fa5935ed0a45187a9c30afe0e569d9fbb1b6f Mon Sep 17 00:00:00 2001 From: Erlend Ellefsen Date: Fri, 8 May 2026 10:58:40 +0200 Subject: [PATCH 2/4] ci(oss-public): isolate DotnetApiDocs to docs.yml inline install --- .config/dotnet-tools.json | 7 ------- .github/workflows/docs.yml | 7 +++---- 2 files changed, 3 insertions(+), 11 deletions(-) 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/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 From 001286cc6aea60466f9c5582301e48a0341454b9 Mon Sep 17 00:00:00 2001 From: Erlend Ellefsen Date: Fri, 8 May 2026 12:07:00 +0200 Subject: [PATCH 3/4] ci(docs): specify DotnetApiDocs tool source --- .github/workflows/docs.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 017b626..8522a8b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -76,7 +76,9 @@ jobs: - name: Install Intility.DotnetApiDocs env: NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: dotnet tool install -g Intility.DotnetApiDocs --version 0.1.5 + run: dotnet tool install -g Intility.DotnetApiDocs + --version 0.1.5 + --source https://nuget.pkg.github.com/Intility/index.json - name: Generate API reference run: dotnet-api-docs --input JsonApiToolkit/bin/docs --output docs/api --strict From 46a669bfe820835417cc3b81858ad3c03963e4ad Mon Sep 17 00:00:00 2001 From: Erlend Ellefsen Date: Mon, 11 May 2026 08:25:36 +0200 Subject: [PATCH 4/4] ci: drop source for DotnetApiDocs --- .github/workflows/docs.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8522a8b..017b626 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -76,9 +76,7 @@ jobs: - name: Install Intility.DotnetApiDocs env: NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: dotnet tool install -g Intility.DotnetApiDocs - --version 0.1.5 - --source https://nuget.pkg.github.com/Intility/index.json + run: dotnet tool install -g Intility.DotnetApiDocs --version 0.1.5 - name: Generate API reference run: dotnet-api-docs --input JsonApiToolkit/bin/docs --output docs/api --strict