Skip to content

Commit 6fe30f2

Browse files
committed
fix: Release on tag
1 parent 221740a commit 6fe30f2

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

.github/workflows/release.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
on:
22
push:
3-
branches:
4-
- release/*
3+
tags:
4+
- '[0-9]+.[0-9]+.[0-9]+'
5+
6+
permissions:
7+
contents: write
58

69
jobs:
710
build:
11+
name: Build NuGet package
812
runs-on: ubuntu-latest
9-
timeout-minutes: 15
13+
timeout-minutes: 5
1014
steps:
1115
- name: Checkout
1216
uses: actions/[email protected]
@@ -20,3 +24,17 @@ jobs:
2024
git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: (\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > RELEASE_NOTES.md
2125
- name: Build
2226
run: ./build.sh --target Publish --publish --nuget --token ${{ secrets.PUBLIC_NUGET_APIKEY }}
27+
release:
28+
name: Create GitHub Release
29+
runs-on: ubuntu-latest
30+
timeout-minutes: 5
31+
steps:
32+
- name: Create release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
tag: ${{ github.ref_name }}
36+
run: |
37+
gh release create "$tag" \
38+
--repo="$GITHUB_REPOSITORY" \
39+
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
40+
--generate-notes

0 commit comments

Comments
 (0)