-
Notifications
You must be signed in to change notification settings - Fork 12
31 lines (27 loc) · 853 Bytes
/
pack.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
name: Build and Publish to NuGet
on:
push:
branches:
- release/v*
- develop
pull_request:
branches:
- release/v*
- develop
jobs:
build-and-publish:
if: github.repository == 'Sichii/Chaos-Server'
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
- name: Pack
run: dotnet pack --configuration Release -o nupkgs
- name: Publish to NuGet
run: |
dotnet nuget push "nupkgs/**/*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push "nupkgs/**/*.snupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate