-
Notifications
You must be signed in to change notification settings - Fork 7
32 lines (25 loc) · 1000 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
name: Publish NuGet Package
on:
push:
tags:
- 'v*.*.*' # Release only on version tags (e.g., v1.0.0)
jobs:
nuget:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Set up .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.x'
- name: Restore dependencies
run: dotnet restore OllamaApiFacade/OllamaApiFacade.csproj
- name: Build the project
run: dotnet build OllamaApiFacade/OllamaApiFacade.csproj --configuration Release --no-restore
- name: Pack the project
run: dotnet pack OllamaApiFacade/OllamaApiFacade.csproj --configuration Release --no-restore --output ./package
- name: Push NuGet package
run: dotnet nuget push ./package/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}