-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.01 KB
/
nuget.yml
File metadata and controls
36 lines (31 loc) · 1.01 KB
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
name: Nuget
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Remove .sqlproj
run: dotnet sln DockerizedTesting.sln remove Examples/ExampleDatabase*/*.*proj
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Setup NuGet.exe for use with actions
uses: NuGet/setup-nuget@v1.0.2
- name: Fix nuget binary
run: chmod +x `whereis nuget.exe | sed 's/nuget:\s//'`
- name: Pack
run: dotnet pack --no-restore --verbosity normal -o ./nuget
- name: Publish
run: nuget.exe push -ApiKey "$NUGET_KEY" -SkipDuplicate -NonInteractive -Source "https://www.nuget.org/" "nuget/"
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}