-
Notifications
You must be signed in to change notification settings - Fork 23
30 lines (26 loc) · 889 Bytes
/
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
name: .NET
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Running Azurite
run: docker run -d -p 10000:10000 -p 10001:10001 mcr.microsoft.com/azure-storage/azurite
- name: Test
run: dotnet test --no-restore
- name: Create the package
run: dotnet pack --configuration Release
- name: Publish the package to NUGET
env: # Set the secret as an input
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
if: ${{ github.ref == 'refs/heads/main' }}
run: dotnet nuget push AutoNumber/bin/Release/*.nupkg --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY