Skip to content

Commit fb92475

Browse files
author
Mark Whitaker
committed
Move NuGet publish workflow to shared-workflows
1 parent 332baf6 commit fb92475

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

.github/workflows/build-test-and-publish-release.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,7 @@ on:
33
release:
44
types: [published]
55

6-
env:
7-
VERSION: ${{github.ref_name}}
8-
96
jobs:
107
publish-to-nuget:
11-
name: Build, test and publish to NuGet.org
12-
runs-on: ubuntu-22.04
13-
steps:
14-
- run: echo "ASSEMBLY_VERSION=$(echo $VERSION | sed -e 's/-.*//')" >> $GITHUB_ENV
15-
- uses: actions/checkout@v2
16-
- run: dotnet build -c Release /p:Version=$VERSION /p:AssemblyVersion=$ASSEMBLY_VERSION
17-
- run: dotnet test -c Release
18-
- run: dotnet pack -c Release -o nugetPackage -p:PackageVersion=$VERSION
19-
- run: dotnet nuget push nugetPackage/*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
8+
name: Publish release to NuGet
9+
uses: markwhitaker/shared-workflows/.github/workflows/dotnet-publish-release-to-nuget.yml@main

0 commit comments

Comments
 (0)