From 863239d3d99aa1848527e5287d7c4af10bc9c9c7 Mon Sep 17 00:00:00 2001 From: Pedram Rezaei Date: Sat, 12 Sep 2026 15:15:27 -0700 Subject: [PATCH] Use NuGet trusted publishing and include package README --- .github/workflows/publish.yml | 13 +++++++++++-- src/Cloudtoid.CodeAnalysis.csproj | 5 +++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index aa95635..d6f6b24 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,12 +6,15 @@ on: jobs: build: + permissions: + contents: read + id-token: write runs-on: ubuntu-latest name: Build Pack and Publish steps: - uses: actions/checkout@v7 - - name: Setup .NET 9 + - name: Setup .NET 10 uses: actions/setup-dotnet@v6 with: dotnet-version: 10.0.x @@ -22,5 +25,11 @@ jobs: - name: Pack run: dotnet pack -c Release --no-build --output . --version-suffix ${{github.run_number}} src/Cloudtoid.CodeAnalysis.csproj + - name: NuGet login + uses: NuGet/login@v1 + id: nuget-login + with: + user: pedramr + - name: Push - run: dotnet nuget push Cloudtoid.CodeAnalysis.*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.nuget_org_api_key }} + run: dotnet nuget push Cloudtoid.CodeAnalysis.*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} diff --git a/src/Cloudtoid.CodeAnalysis.csproj b/src/Cloudtoid.CodeAnalysis.csproj index 2163c0e..4d1396b 100644 --- a/src/Cloudtoid.CodeAnalysis.csproj +++ b/src/Cloudtoid.CodeAnalysis.csproj @@ -6,6 +6,7 @@ + README.md Cloudtoid.CodeAnalysis Cloudtoid.CodeAnalysis pedram@rezaei.us @@ -35,4 +36,8 @@ + + + +