-
Notifications
You must be signed in to change notification settings - Fork 8
37 lines (37 loc) · 1.02 KB
/
release.yml
File metadata and controls
37 lines (37 loc) · 1.02 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
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install .NET SDK
uses: actions/setup-dotnet@v2
with:
dotnet-version: |
8.0.x
9.0.x
include-prerelease: true
- name: Set VERSION
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Build
run: dotnet build --configuration Release /p:Version=${VERSION}
- name: Test
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
- name: Pack
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
- name: Push
run: dotnet nuget push *.nupkg --source https://api.nuget.org/v3/index.json --api-key ${NUGET_KEY}
env:
NUGET_KEY: ${{ secrets.NUGET_KEY }}
- name: Create GH Release
uses: softprops/action-gh-release@v1
with:
files: |
*.nupkg
*.snupkg