-
Notifications
You must be signed in to change notification settings - Fork 7
31 lines (27 loc) · 882 Bytes
/
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
name: Publish Dotnet Package
on:
workflow_dispatch:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.NUGET_API_KEY }}
nuget-version: '5.x'
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Clean
run: dotnet clean ./RediSearchClient.sln --configuration Release && dotnet nuget locals all --clear
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Release
- name: Publish NuGet Package
env:
api_key: ${{secrets.NUGET_API_KEY}}
run: "nuget push RediSearchClient/bin/Release/*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey $api_key"