Skip to content

Commit 2f41189

Browse files
chore: stage workflow + package changes for OSS public flip
1 parent 134eaa9 commit 2f41189

2 files changed

Lines changed: 16 additions & 13 deletions

File tree

.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

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.0</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)