-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (37 loc) · 1.41 KB
/
ci.yml
File metadata and controls
52 lines (37 loc) · 1.41 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: ci
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
DOTNET_NOLOGO: true
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.x
- name: Install tools
run: dotnet tool restore
- name: Restore dependencies
run: dotnet restore src/Vapi.Net/Vapi.Net.csproj
- name: Build
run: dotnet build src/Vapi.Net/Vapi.Net.csproj --no-restore -c Release
- name: Restore test dependencies
run: dotnet restore src/Vapi.Net.Test/Vapi.Net.Test.csproj
- name: Build tests
run: dotnet build src/Vapi.Net.Test/Vapi.Net.Test.csproj --no-restore -c Release
- name: Test
run: dotnet test src/Vapi.Net.Test/Vapi.Net.Test.csproj --no-restore --no-build -c Release
- name: Pack
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
run: dotnet pack src/Vapi.Net/Vapi.Net.csproj --no-build --no-restore -c Release
- name: Publish to NuGet.org
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push src/Vapi.Net/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source "nuget.org"