-
-
Notifications
You must be signed in to change notification settings - Fork 22
47 lines (37 loc) · 1.21 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
40
41
42
43
44
45
46
47
name: Release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Get version from tag
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}
shell: bash
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
- name: Restore tools
run: dotnet tool restore
- name: Run Build
run: dotnet build -c Release -maxCpuCount
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
validation_level: warn
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: bin/*.nupkg
token: ${{ secrets.GITHUB_TOKEN }}
body: ${{ steps.changelog_reader.outputs.log_entry }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
- name: Push packages
run: dotnet nuget push "bin/*.nupkg" -s "https://api.nuget.org/v3/index.json" -k ${{ secrets.NUGET_KEY }} --skip-duplicate