-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (24 loc) · 813 Bytes
/
Copy pathpublish.yml
File metadata and controls
32 lines (24 loc) · 813 Bytes
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 to NuGet
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
environment: NUGET_API_KEY
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore dependencies
run: dotnet restore
- name: Run tests
run: dotnet test --configuration Release --no-restore
- name: Pack
run: dotnet pack ./Cypher.ScriptGenerator/Cypher.ScriptGenerator.csproj --configuration Release --no-restore
- name: Publish to NuGet
run: dotnet nuget push ./Cypher.ScriptGenerator/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate