Skip to content

Commit

Permalink
add publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
callmekoo authored Apr 8, 2024
1 parent d2320f4 commit 1759165
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,31 @@ jobs:
run: dotnet build Source --no-restore
- name: Test
run: dotnet test Source\RetryableAssertions.Tests\RetryableAssertions.Tests.csproj --no-build --verbosity normal

publish:
runs-on: windows-2019
needs: test
if: github.ref_type == 'tag'
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore Source
- name: Build
run: dotnet build Source --no-restore
- name: Pack dotnet
run: dotnet pack --configuration Release Source
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
path: "**/*.nupkg"
if-no-files-found: error
- name: Publish NuGet
run: dotnet nuget push "**/*.nupkg" --source https://api.nuget.org/v3/index.json --no-symbols --api-key $env:NUGET_API_KEY
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}


0 comments on commit 1759165

Please sign in to comment.