Skip to content

Commit ff5f86a

Browse files
author
Forest
committed
Add nuget yaml
1 parent 1abd9ca commit ff5f86a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/nuget.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish to Nuget
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
build:
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ windows-latest ]
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v1
21+
with:
22+
dotnet-version: 7.x
23+
- name: Pack
24+
run: dotnet pack /p:Version=${{ inputs.version }} --output .
25+
- name: Push
26+
env:
27+
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}
28+
run: dotnet nuget push innersloth.Hazel-Networking.${{ inputs.version }}.nupkg --source https://api.nuget.org/v3/index.json --api-key "$env:NUGET_KEY"

0 commit comments

Comments
 (0)