forked from Redth/HttpTwo
-
Notifications
You must be signed in to change notification settings - Fork 5
31 lines (23 loc) · 767 Bytes
/
release.yml
File metadata and controls
31 lines (23 loc) · 767 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
name: Release to NuGet
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout latest
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.*
- name: Version Output
run: echo ${{ github.event.release.tag_name }} # Output: 1.1.2
- name: Build
run: dotnet build --configuration Release
- name: Generate package
run: dotnet pack --no-build -c Release -o out /p:Version=${{ github.event.release.tag_name }}
- name: Publish
run: dotnet nuget push ./out/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate