Skip to content

Commit

Permalink
Update action to publish to nuget.org
Browse files Browse the repository at this point in the history
  • Loading branch information
bstadick authored May 22, 2024
1 parent 856c3d6 commit 8152936
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/dotnetcorerelease.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
name: .NET Release
name: .NET Build/Publish

on:
push:
workflow_dispatch:
release:
types: [published]
branches:
- main

env:
CONFIGURATION: Release
Expand All @@ -27,13 +31,6 @@ jobs:
uses: actions/[email protected]
with:
global-json-file: ${{ env.GLOBALJSON }}
source-url: https://nuget.pkg.github.com/bstadick/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Nuget.exe
uses: nuget/[email protected]
with:
nuget-api-key: ${{ secrets.GITHUB_TOKEN }}
- name: Restore with dotnet
uses: nick-fields/retry@v3
with:
Expand All @@ -60,4 +57,8 @@ jobs:
${{ env.PROJECTDIRPATH }}\bin\${{ env.CONFIGURATION }}\*.nupkg
${{ env.TESTPROJECTDIRPATH }}\TestResults\*.trx
- name: Deploy to GPR with dotnet
run: dotnet nuget push "${{ env.PROJECTDIRPATH }}\bin\${{ env.CONFIGURATION }}\*.nupkg" -s https://nuget.pkg.github.com/bstadick/index.json -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
if: github.event_name == 'release'
run: dotnet nuget push "${{ env.PROJECTDIRPATH }}\bin\${{ env.CONFIGURATION }}\*.nupkg" --source https://nuget.pkg.github.com/bstadick/index.json --api-key "${{ secrets.GITHUB_TOKEN }}" --skip-duplicate
- name: Deploy to nuget.org with dotnet
if: github.event_name == 'release'
run: dotnet nuget push "${{ env.PROJECTDIRPATH }}\bin\${{ env.CONFIGURATION }}\*.nupkg" --source https://api.nuget.org/v3/index.json --api-key "${{ secrets.NUGET_APIKEY }}" --skip-duplicate

0 comments on commit 8152936

Please sign in to comment.