Skip to content

chore: handle warnings in build pipeline (#127) #380

chore: handle warnings in build pipeline (#127)

chore: handle warnings in build pipeline (#127) #380

Workflow file for this run

name: .NET
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # depth is needed for nbgv
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- uses: dotnet/nbgv@master
with:
setAllVars: true
- name: Restore dependencies
run: dotnet restore Build.csproj
- name: Purge
run: del src/Dapper.*/bin/Release/Dapper.*.nupkg
- name: Build
run: dotnet build Build.csproj --no-restore -c Release
- name: Test
run: dotnet test Build.csproj --no-build --verbosity normal -c Release -f net6.0 --filter FullyQualifiedName!~Integration
- name: Pack
if: ${{ success() && !github.base_ref }}
run: dotnet pack src/Dapper.AOT/Dapper.AOT.csproj --no-build --verbosity normal -c Release
- name: Push to MyGet
if: ${{ success() && !github.base_ref }}
run: dotnet nuget push src/Dapper.*/bin/Release/Dapper.*.nupkg --source https://www.myget.org/F/dapper/api/v2/package --api-key "$env:MYGETAPIKEY"
env:
MYGETAPIKEY: ${{ secrets.MYGETAPIKEY }}