Skip to content

Commit 4e77576

Browse files
committed
Permit alpha, beta, and RC releases
1 parent 2b87f11 commit 4e77576

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-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

+5-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
@@ -68,10 +68,14 @@ jobs:
6868
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=${{ github.event.inputs.snapshot_version }}
6969
git add pom.xml kcbq-api/pom.xml kcbq-connector/pom.xml
7070
git commit -m "Bump version to ${{ github.event.inputs.snapshot_version }}"
71+
# Ugly workaround for https://github.com/peter-evans/create-pull-request/issues/2108
72+
git checkout $(git rev-parse HEAD)
7173
7274
- name: Create Pull Request
7375
uses: peter-evans/create-pull-request@v3
7476
with:
77+
# Ugly workaround for https://github.com/peter-evans/create-pull-request/issues/2108 (part two)
78+
base: master
7579
branch: release-${{ github.event.inputs.release_version }}
7680
delete-branch: true
7781
draft: true

0 commit comments

Comments
 (0)