Skip to content

Commit

Permalink
GH token secret
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmclaws committed Mar 27, 2024
1 parent bcd44f1 commit 7e1725e
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/nuget-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,17 @@ jobs:
deployment:
runs-on: windows-latest

if: ${{ github.event.workflow_run.conclusion == 'success' }}

steps:

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GH_PAT }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Push to NuGet
run: dotnet nuget push ./nuget-packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

on-failure:
runs-on: windows-latest

if: ${{ github.event.workflow_run.conclusion == 'failure' }}

steps:
- run: echo 'The triggering workflow failed. Publishing NuGet packages not required.'
run: dotnet nuget push ./nuget-packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 comments on commit 7e1725e

Please sign in to comment.