Skip to content

Commit 8262c8a

Browse files
committed
Permit alpha, beta, and RC releases
1 parent 2b87f11 commit 8262c8a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/create_release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
run: |
5050
export commit_title=$(git log --pretty=format:%s -1 ${{ github.event.inputs.commit_hash }})
5151
echo "Commit title: $commit_title"
52-
if [[ $commit_title =~ ^Release\ version\ [0-9]*\.[0-9]*\.[0-9]*$ ]]; then
52+
if [[ $commit_title =~ ^Release\ version\ [0-9]+\.[0-9]+\.[0-9]+(-(alpha|beta|rc[0-9]+))?$ ]]; then
5353
echo "Valid commit title"
5454
else
5555
echo "Invalid commit title"

.github/workflows/release_pr_workflow.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: Check versions
4242
run: |
4343
echo "Checking release version..."
44-
if echo ${{ github.event.inputs.release_version }} | grep --invert-match '^[0-9]\+\.[0-9]\+\.[0-9]\+$' > /dev/null; then
44+
if echo ${{ github.event.inputs.release_version }} | '^[0-9]\+\.[0-9]\+\.[0-9]\+\(-\(alpha\|beta\|rc[0-9]\+\)\)\?$' > /dev/null; then
4545
echo "Release version is invalid"
4646
exit 1
4747
fi
@@ -73,6 +73,8 @@ jobs:
7373
uses: peter-evans/create-pull-request@v3
7474
with:
7575
branch: release-${{ github.event.inputs.release_version }}
76+
# Workaround for https://github.com/peter-evans/create-pull-request/issues/2108
77+
branch-suffix: short-commit-hash
7678
delete-branch: true
7779
draft: true
7880
title: Release version ${{ github.event.inputs.release_version }}

0 commit comments

Comments
 (0)