Skip to content

Commit 5e661d3

Browse files
author
PortaSFTPServer
committed
add GitHub Release on tag push
1 parent e27bec3 commit 5e661d3

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

.github/workflows/release-nuget.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
type: boolean
1818

1919
permissions:
20-
contents: read
20+
contents: write
2121

2222
concurrency:
2323
group: nuget-release-${{ github.ref }}
@@ -116,7 +116,7 @@ jobs:
116116
if-no-files-found: error
117117

118118
- name: Publish to NuGet.org
119-
if: github.event_name == 'push' || github.event.inputs.publish == 'true'
119+
if: github.event.inputs.publish == 'true'
120120
shell: pwsh
121121
env:
122122
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
@@ -136,3 +136,13 @@ jobs:
136136
--api-key $env:NUGET_API_KEY `
137137
--skip-duplicate
138138
}
139+
140+
- name: Create GitHub Release
141+
if: github.event_name == 'push'
142+
shell: pwsh
143+
env:
144+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
145+
run: |
146+
gh release create "${{ github.ref_name }}" `
147+
--title "${{ github.ref_name }}" `
148+
--generate-notes

0 commit comments

Comments
 (0)