GitHub .Net 8 build #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Core | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8.0.100 | |
- run: dotnet restore | |
- run: dotnet build --configuration Release --no-restore | |
- run: dotnet test --no-build --configuration Release --verbosity normal | |
- run: dotnet pack --no-build --configuration Release --output . | |
- name: Publish nugets | |
if: github.event_name != 'pull_request' | |
run: | | |
dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate --no-symbols |