-
Notifications
You must be signed in to change notification settings - Fork 12
39 lines (30 loc) · 1.03 KB
/
release.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
name: Publish NuGet Package
on:
push:
tags:
- "*.*.*"
jobs:
release:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build ./Backtrace/Backtrace.csproj --no-restore --configuration Release
- name: Pack
run: dotnet pack ./Backtrace/Backtrace.csproj --configuration Release --no-build -o ./output/
- name: print current tag version
env:
PACKAGE_VERSION: ${{ github.ref_name }}
run: echo $PACKAGE_VERSION ./output/Backtrace$PACKAGE_VERSION.nupkg
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
PACKAGE_VERSION: ${{ github.ref_name }}
run: dotnet nuget push ./output/Backtrace$PACKAGE_VERSION.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json