-
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 978 Bytes
/
nuget-publish.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
name: Publish DynamicDiToolkit to NuGet
on:
push:
branches:
- main # Your default release branch
paths:
- 'src/DynamicDiToolkit/**'
jobs:
publish:
name: Build and Publish
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
# Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
# Restore
- name: Dotnet restore
run: dotnet restore src/DynamicDiToolkit/DynamicDiToolkit.csproj
# Publish
- name: Create the package
run: dotnet pack -c Release -o . src/DynamicDiToolkit/DynamicDiToolkit.csproj
- name: Publish to nuget.org
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: nuget push DynamicDiToolkit.*.nupkg -src https://api.nuget.org/v3/index.json ${{secrets.NUGET_API_KEY}}