Skip to content

Commit 1b3cde8

Browse files
committed
Update GitHub Action to support releases on tags
1 parent bacdfc9 commit 1b3cde8

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/build-and-pack.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ name: .NET Build and Pack
33
on:
44
push:
55
branches: [ master, main ]
6+
tags:
7+
- 'v*'
68
pull_request:
79
branches: [ master, main ]
810

911
jobs:
1012
build:
1113
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1216

1317
steps:
1418
- uses: actions/checkout@v4
@@ -31,3 +35,12 @@ jobs:
3135
path: |
3236
**/*.nupkg
3337
**/*.snupkg
38+
39+
- name: Create Release
40+
if: startsWith(github.ref, 'refs/tags/')
41+
uses: softprops/action-gh-release@v2
42+
with:
43+
files: |
44+
**/*.nupkg
45+
**/*.snupkg
46+
generate_release_notes: true

0 commit comments

Comments
 (0)