forked from DapperLib/DapperAOT
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (38 loc) · 1.21 KB
/
dotnet.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: .NET
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # depth is needed for nbgv
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
7.0.x
8.0.x
include-prerelease: true
- uses: dotnet/nbgv@master
with:
setAllVars: true
- name: Restore dependencies
run: dotnet restore Build.csproj
- 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 net7.0
- 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.AOT/bin/Release/Dapper.AOT.${NBGV_NuGetPackageVersion}.nupkg --source https://www.myget.org/F/dapper/api/v2/package --api-key ${MYGETAPIKEY}
env:
MYGETAPIKEY: ${{ secrets.MYGETAPIKEY }}