Skip to content

Commit 7d062bb

Browse files
authored
Workflow to push to Nuget (#1)
* Create nuget-deploy.yml * Update workflow * Update name * Pack the nuget package * Update working directory
1 parent 9c9a38d commit 7d062bb

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/nuget-deploy.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Public package to NuGet
2+
on:
3+
push:
4+
branches: [main]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
timeout-minutes: 10
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
- name: Pack nuget package
13+
working-directory: ./src/Segment.PublicApi
14+
run: dotnet pack -c Release
15+
- name: Push nuget package
16+
working-directory: ./src/Segment.PublicApi
17+
run: dotnet nuget push bin/Release/Segment.PublicApi.*.nupkg -k ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json --skip-duplicate
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }}

0 commit comments

Comments
 (0)