-
-
Notifications
You must be signed in to change notification settings - Fork 1
28 lines (22 loc) · 786 Bytes
/
dotnet_tool_build.yml
File metadata and controls
28 lines (22 loc) · 786 Bytes
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
name: Build and Publish .NET Tool
on:
workflow_run:
workflows: [Release]
types:
- completed
jobs:
build-and-pack:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Get semver without "v"
id: version
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
- name: Build and Pack as .NET tool
uses: devcontainers/ci@v0.3
with:
runCmd: |
dotnet cake --target Pack-DotNetTool --package-version ${{ steps.version.outputs.VERSION }}
- name: Publish to NuGet (optional)
run: dotnet nuget push ./artifacts/nupkgs/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}