Skip to content

Commit b1430cd

Browse files
chore: stage workflow + package changes for OSS public flip (#148)
* chore: stage workflow + package changes for OSS public flip * ci(oss-public): isolate DotnetApiDocs to docs.yml inline install * ci(docs): specify DotnetApiDocs tool source * ci: drop source for DotnetApiDocs
1 parent 5a12dd3 commit b1430cd

4 files changed

Lines changed: 19 additions & 24 deletions

File tree

.config/dotnet-tools.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88
"csharpier"
99
],
1010
"rollForward": false
11-
},
12-
"Intility.DotnetApiDocs": {
13-
"version": "0.1.5",
14-
"commands": [
15-
"dotnet-api-docs"
16-
],
17-
"rollForward": false
1811
}
1912
}
2013
}

.github/workflows/ci-cd.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ jobs:
2121
runs-on: ubuntu-latest
2222
permissions:
2323
contents: read
24-
packages: read
2524

2625
steps:
2726
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -30,9 +29,6 @@ jobs:
3029
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
3130
with:
3231
dotnet-version: 10.0.x
33-
source-url: https://nuget.pkg.github.com/Intility/index.json
34-
env:
35-
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3632

3733
- name: Restore
3834
run: dotnet restore --locked-mode
@@ -50,7 +46,7 @@ jobs:
5046
runs-on: ubuntu-latest
5147
permissions:
5248
contents: read
53-
packages: write
49+
id-token: write # OIDC token for NuGet trusted publishing
5450

5551
steps:
5652
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
@@ -59,16 +55,22 @@ jobs:
5955
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
6056
with:
6157
dotnet-version: 10.0.x
62-
source-url: https://nuget.pkg.github.com/Intility/index.json
63-
env:
64-
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6558

6659
- name: Restore
6760
run: dotnet restore --locked-mode
6861

6962
- name: Build and Pack
7063
run: dotnet pack JsonApiToolkit/JsonApiToolkit.csproj -c Release --no-restore
7164

72-
- name: Publish to GitHub Packages
73-
run: dotnet nuget push "JsonApiToolkit/bin/Release/*.nupkg" --api-key ${{
74-
secrets.GITHUB_TOKEN }}
65+
# Exchange OIDC token for a short-lived NuGet API key
66+
- name: NuGet login
67+
id: login
68+
uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0
69+
with:
70+
user: ${{ secrets.NUGET_USER }}
71+
72+
- name: Publish to NuGet.org
73+
run: dotnet nuget push "JsonApiToolkit/bin/Release/*.nupkg"
74+
--source https://api.nuget.org/v3/index.json
75+
--api-key ${{ steps.login.outputs.NUGET_API_KEY }}
76+
--skip-duplicate

.github/workflows/docs.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,13 @@ jobs:
7373
run: dotnet build JsonApiToolkit/JsonApiToolkit.csproj -c Release -o
7474
JsonApiToolkit/bin/docs
7575

76-
- name: Restore .NET tools
76+
- name: Install Intility.DotnetApiDocs
7777
env:
7878
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79-
run: dotnet tool restore
79+
run: dotnet tool install -g Intility.DotnetApiDocs --version 0.1.5
8080

8181
- name: Generate API reference
82-
run: dotnet tool run dotnet-api-docs -- --input JsonApiToolkit/bin/docs --output
83-
docs/api --strict
82+
run: dotnet-api-docs --input JsonApiToolkit/bin/docs --output docs/api --strict
8483

8584
- name: Install Python dependencies
8685
run: uv venv && uv pip install -r docs/requirements.txt

JsonApiToolkit/JsonApiToolkit.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
<Version>2.1.1</Version>
1010
<Authors>Intility</Authors>
1111
<Company>Intility</Company>
12-
<Description>A toolkit for implementing JSON:API specification in .NET applications</Description>
13-
<PackageTags>jsonapi;api;rest;dotnet</PackageTags>
12+
<Description>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.</Description>
13+
<PackageTags>jsonapi;json-api;aspnetcore;efcore;rest;api;dotnet</PackageTags>
1414
<RepositoryUrl>https://github.com/intility/json-api-toolkit</RepositoryUrl>
1515
<RepositoryType>git</RepositoryType>
16+
<PackageProjectUrl>https://github.com/intility/json-api-toolkit</PackageProjectUrl>
1617
<PackageReadmeFile>README.md</PackageReadmeFile>
1718
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1819

0 commit comments

Comments
 (0)