-
Notifications
You must be signed in to change notification settings - Fork 19
38 lines (36 loc) · 1002 Bytes
/
build.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
name: Build EfficientDynamoDb
on:
push:
branches:
- main
tags:
- 'effddb-v*'
paths:
- 'src/**'
pull_request:
branches:
- main
paths:
- 'src/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.301
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --no-build --configuration Release
- name: Publish to NuGet
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/effddb-v') }}
run: |
dotnet pack --no-build -c Release src/EfficientDynamoDb/EfficientDynamoDb.csproj -o .
dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate