-
Notifications
You must be signed in to change notification settings - Fork 7
33 lines (31 loc) · 829 Bytes
/
main.yml
File metadata and controls
33 lines (31 loc) · 829 Bytes
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
name: Main
on:
push:
branches: [main]
paths-ignore:
- "*.md"
- ".github/workflows/*.yml"
pull_request:
branches: [main]
paths-ignore:
- "*.md"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test -c Release
- name: Publish
run: dotnet publish -c Release
- name: Push to Nuget
if: github.ref == 'refs/heads/main'
env:
NUGET_TOKEN: ${{secrets.NUGET_TOKEN}}
run: dotnet nuget push --api-key $NUGET_TOKEN --source https://api.nuget.org/v3/index.json ./src/AutoRegisterInject/bin/Release/*.nupkg