-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (29 loc) · 1.13 KB
/
publish-nuget.yml
File metadata and controls
37 lines (29 loc) · 1.13 KB
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
name: Publish to NuGet
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
8.x
6.x
- name: 'Get Version'
id: version
run: echo "version-without-v=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Pack
run: dotnet pack --configuration Release /p:ContinuousIntegrationBuild=true /p:PackageVersion=${{ steps.version.outputs.version-without-v }} /p:PackageReleaseNotes="See https://github.com/ByteAether/QueryLink/releases/tag/${{ github.event.release.tag_name }}" --output ./output src/ByteAether.QueryLink/ByteAether.QueryLink.csproj
- name: Upload NuGet package as artifact
uses: actions/upload-artifact@v7
with:
name: nuget-package
path: ./output/*.nupkg
- name: Publish to NuGet
run: dotnet nuget push ./output/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json