-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (41 loc) · 1.45 KB
/
publish_tool.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
48
49
50
51
52
53
name: publish tool
on:
workflow_dispatch:
jobs:
publish_tool:
name: Publish Tool
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
global-json-file: global.json
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Determine Version
id: version
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
- name: Package
run: dotnet pack --configuration Release --output nuget --nologo -p:Version=${{ steps.version.outputs.nuGetVersionV2 }}
- name: Generate Release Notes
run: |-
dotnet tool install --global ConventionalChangelog --version 0.7.0
changelog "${{ github.workspace }}" >> "changelog.md"
- name: Create a Release
uses: comnoco/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ steps.version.outputs.semVer }}"
release_name: "${{ steps.version.outputs.semVer }}"
body_path: "changelog.md"
prerelease: ${{ steps.version.outputs.preReleaseLabel != '' }}
# - name: Publish
# run: dotnet nuget push "**/*.nupkg" --source nuget.org --api-key ${{ secrets.NUGET_API_KEY }}