-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (30 loc) · 945 Bytes
/
main.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
name: Publish Packages
on:
push:
branches: [ "main" ]
paths:
- 'src/**'
- '.github/workflows/**'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build packages
run: dotnet build --no-restore
- name: Run tests
run: dotnet test --no-build
#PUBLISH
- name: Publish to Nuget
run: dotnet nuget push "./build/*.nupkg" -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish to GitHub
run: dotnet nuget push "./build/*.nupkg" -k ${{secrets.GITHUB_TOKEN}} -s https://nuget.pkg.github.com/ocluse/index.json --skip-duplicate