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
13 changes: 12 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# Trusted publishing exchanges the GitHub OIDC token for a short-lived nuget.org API key.
id-token: write
steps:
- uses: actions/checkout@v3
- name: Setup .NET
Expand All @@ -29,8 +34,14 @@ jobs:
- name: Push to GitHub Packages
run: dotnet nuget push ./artifacts/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/top-gg/index.json --skip-duplicate
if: github.ref == 'refs/heads/master'
- name: Log in to NuGet
id: nuget-login
uses: NuGet/login@v1
with:
user: ${{ secrets.NUGET_USER }}
if: github.ref == 'refs/heads/master'
- name: Push to Nuget
run: dotnet nuget push ./artifacts/*.nupkg -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json --skip-duplicate
run: dotnet nuget push ./artifacts/*.nupkg -k ${{ steps.nuget-login.outputs.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
if: github.ref == 'refs/heads/master'

env:
Expand Down
Loading