Skip to content

Commit

Permalink
Update Publish Nuget (#59)
Browse files Browse the repository at this point in the history
Use matrix for .net versions to test all versions
  • Loading branch information
gfs authored Mar 26, 2024
1 parent 4725b2b commit b493d99
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/publishnuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,27 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
dotnet-version: |
3.1.x
6.0.x
7.0.x
8.0.x
include-prerelease: true
- name: Nerdbank.GitVersioning
# You may pin to the exact commit or the version.
# uses: dotnet/nbgv@49d4f35f34d895d282b99855b2e0034f8f608ba5
uses: dotnet/[email protected]
with:
setAllVars: true

- name: Restore dependencies
- name: Install dependencies
run: dotnet restore
- name: Test Before Publish
run: dotnet test --verbosity normal -f net8.0
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Build
run: dotnet pack --no-restore StreamRegex.Extensions -o NuPkgs
- name: Setup NuGet.exe for use with actions
uses: NuGet/[email protected]
with:
nuget-api-key: ${{secrets.NUGET_API_KEY}}
- name: Nuget Publish
run: nuget push NuPkgs/*.*nupkg -Source https://api.nuget.org/v3/index.json
run: nuget push NuPkgs/*.*nupkg -Source https://api.nuget.org/v3/index.json

0 comments on commit b493d99

Please sign in to comment.