Skip to content

Commit

Permalink
Add NuGet publishing job for tags
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad committed Jan 24, 2024
1 parent 519a949 commit 32502c6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
Expand Down Expand Up @@ -31,3 +33,20 @@ jobs:
with:
name: GovUk.OneLogin.AspNetCore.nupkg
path: src/GovUk.OneLogin.AspNetCore/bin/Release/*.nupkg

release:
name: "Release"
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')

steps:
- name: Download package artifact
uses: actions/download-artifact@v3
with:
name: GovUk.OneLogin.AspNetCore.nupkg

- name: Publish package to NuGet
run: dotnet nuget push **/*.nupkg --api-key $NUGET_TOKEN --source https://api.nuget.org/v3/index.json --skip-duplicate
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}

0 comments on commit 32502c6

Please sign in to comment.