-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (26 loc) · 1.06 KB
/
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
name: Publish Nupkg to Nuget
on:
release:
types: [published]
env:
PROJECT_PATH: 'BotCity.Maestro.SDK.csproj'
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/Output
NUGET_PUSH_URL: ${{ secrets.NUGET_PUSH_URL }}
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- name: 'Pack & Publish project'
run: |
dotnet clean ${{ env.PROJECT_PATH }}
dotnet pack ${{ env.PROJECT_PATH }} --configuration Release --include-symbols --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json --skip-duplicate
dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.snupkg -k ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json --skip-duplicate