-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (38 loc) · 1.08 KB
/
ci.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
50
name: CI
on: [push]
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
jobs:
linux_build:
name: Linux build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
# Needed for Kudu test binary used in integration tests
- name: Install libncurses5
run: sudo apt install -y libncurses5
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test --no-restore --no-build --configuration Release
publish:
name: Publish nuget package
needs: linux_build
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Publish NuGet package on version change
uses: alirezanet/[email protected]
with:
PROJECT_FILE_PATH: src/Knet.Kudu.Client/Knet.Kudu.Client.csproj
NUGET_KEY: ${{secrets.KUDU_NUGET_API_KEY}}