Skip to content

Commit b6c4efe

Browse files
authored
Enable automated release tagging when PR from branch's 'release-xxxx' (#329)
1 parent 0949faa commit b6c4efe

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/release-tagger.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Tag Release
2+
on:
3+
pull_request:
4+
types: [closed]
5+
6+
jobs:
7+
TagRelease:
8+
permissions:
9+
contents: write
10+
name: Create Release Tag
11+
runs-on: ubuntu-22.04
12+
if: github.event.pull_request.merged == true && startsWith( github.event.pull_request.head.ref, 'release-' )
13+
steps:
14+
- uses: bhowell2/github-substring-action@1.0.2
15+
id: release_number
16+
with:
17+
value: ${{ github.event.pull_request.head.ref }}
18+
index_of_str: "release-"
19+
- name: Create Tag
20+
uses: tvdias/github-tagger@v0.0.2
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
tag: ${{ steps.release_number.outputs.substring }}

0 commit comments

Comments
 (0)