-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (28 loc) · 964 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
32
33
34
35
36
37
#
# Publish releases to Nuget
#
name: Publish new release
on:
release:
types: [ published ]
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
publish:
name: Publish release to Nuget
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Install dependencies
run: dotnet restore "src/Logto.WebApi.Sdk"
- name: Build
run: dotnet build "src/Logto.WebApi.Sdk" --configuration Release --no-restore
- name: Pack
run: dotnet pack "src/Logto.WebApi.Sdk" -c Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg --no-build --output nuget
- name: Publish NuGet packages to NuGet
run: dotnet nuget push nuget/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source "nuget.org"