Skip to content

Commit 939d524

Browse files
committed
ci: Update CI for .NET build and release process
1 parent 58cbf7f commit 939d524

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/dotnet.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ on:
33
push:
44
branches:
55
- main
6+
tags:
7+
- v*
68
paths:
79
- 'src/**'
810
- '.github/workflows/**'
911

12+
permissions:
13+
contents: write
14+
1015
jobs:
11-
buind-test-publish:
16+
publish:
1217
name: Build, test and publish
1318
runs-on: windows-latest
1419
steps:
@@ -42,4 +47,20 @@ jobs:
4247
**.nupkg
4348
--skip-duplicate
4449
--source https://api.nuget.org/v3/index.json
45-
--api-key ${{ secrets.NUGET_KEY }}
50+
--api-key ${{ secrets.NUGET_KEY }}
51+
52+
release:
53+
name: Release
54+
runs-on: ubuntu-latest
55+
needs: [publish]
56+
if: startsWith(github.ref, 'refs/tags/v')
57+
steps:
58+
- name: Checkout
59+
uses: actions/checkout@v4
60+
61+
- name: Create release
62+
run: gh release create ${{ github.ref_name }}
63+
--title "${{ github.ref_name }}"
64+
--generate-notes
65+
env:
66+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)