-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (30 loc) · 901 Bytes
/
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
40
name: Release
on:
push:
tags:
- '*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.x
- name: Build Version
id: vars
run: echo "VERSION=<Version>${GITHUB_REF#refs/tags/}</Version>" >> "$GITHUB_OUTPUT"
- name: Apply Version
uses: jacobtomlinson/gha-find-replace@v2
with:
find: "<Version>.*<\\/Version>"
replace: "${{ steps.vars.outputs.VERSION }}"
include: "**/*.csproj"
regex: true
- name: Build
run: dotnet build --configuration Release
- name: Pack
run: dotnet pack --configuration Release
- name: Publish
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json