Skip to content

Update master.yml

Update master.yml #3

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
permissions:
id-token: write
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-build --verbosity normal
- name: NuGet login
uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: NuGet push
run: |
dotnet nuget push src/DiaSharp/bin/Release/*.nupkg -k ${{steps.login.outputs.NUGET_API_KEY}} -n -s https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push src/Managed/bin/Release/*.nupkg -k ${{steps.login.outputs.NUGET_API_KEY}} -n -s https://api.nuget.org/v3/index.json --skip-duplicate