-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (32 loc) · 1.18 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
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: 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: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
global-json-file: /global.json
- name: Package
run: dotnet pack --configuration Release --output nuget --nologo -p:Version=${{ steps.version.outputs.nuGetVersionV2 }}
- name: Tag Repository
uses: rickstaa/action-create-tag@v1
with:
tag: "v${{ steps.version.outputs.semVer }}"
- name: Publish
run: dotnet nuget push "**/*.nupkg" --source nuget.org --api-key ${{ secrets.NUGET_API_KEY }}