-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (32 loc) · 945 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
38
39
40
41
42
43
name: Publish to NuGet
on:
push:
branches:
- master
jobs:
build:
runs-on: windows-latest
defaults:
run:
working-directory: src
env:
BUILD_CONFIG: 'Release'
SOLUTION: 'SenseNet.Search.Lucene29.sln'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore ${{env.SOLUTION}}
- name: Build
run: dotnet build ${{env.SOLUTION}} --configuration Release --no-restore
- name: Pack nugets
run: dotnet pack ${{env.SOLUTION}} -c Release --no-build --output .
- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --skip-duplicate --api-key ${{secrets.nuget_api_key}} --source https://api.nuget.org/v3/index.json