Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/dotnet-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # nuget.org trusted publishing (OIDC)

steps:
- name: Setup Git
Expand Down Expand Up @@ -57,9 +60,16 @@ jobs:
if: steps.versionize.outcome == 'success'
run : dotnet pack **/*/JsonPatchGenerator.csproj --configuration Release -o out/pack

- name: NuGet login (trusted publishing)
id: nuget-login
if: steps.versionize.outcome == 'success'
uses: NuGet/login@v1
with:
user: ${{ vars.NUGET_USER }}

- name: Publish
if: steps.versionize.outcome == 'success'
run: dotnet nuget push ./out/pack/*.nupkg --api-key ${{secrets.FIREBEND_NUGET_KEY}} --skip-duplicate --source https://api.nuget.org/v3/index.json
run: dotnet nuget push ./out/pack/*.nupkg --api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} --skip-duplicate --source https://api.nuget.org/v3/index.json

- name: Push version changes
if: steps.versionize.outcome == 'success'
Expand Down
Loading