File tree 2 files changed +26
-7
lines changed
2 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 30
30
description : " Hash of 'Release version x.y.z' commit"
31
31
required : true
32
32
33
+ permissions :
34
+ contents : write
35
+ pull-requests : write
36
+ issues : write
37
+
33
38
jobs :
34
39
build :
35
40
name : Create Release
36
41
runs-on : ubuntu-latest
37
42
steps :
38
- - name : Setup Java SDK
39
-
40
- with :
41
- java-version : 11
42
-
43
43
- name : Checkout code
44
44
uses : actions/checkout@v2
45
45
with :
49
49
run : |
50
50
export commit_title=$(git log --pretty=format:%s -1 ${{ github.event.inputs.commit_hash }})
51
51
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
53
53
echo "Valid commit title"
54
54
else
55
55
echo "Invalid commit title"
59
59
echo "Will use version ${version}"
60
60
echo "version=${version}" >> $GITHUB_ENV
61
61
62
+ - name : Set up JDK 8
63
+ uses : actions/setup-java@v4
64
+ with :
65
+ distribution : ' adopt'
66
+ java-version : 8
67
+ cache : maven
68
+
62
69
- name : Build
63
70
run : |
64
71
mvn -f kcbq-connector clean package assembly:single@release-artifacts -DskipTests
Original file line number Diff line number Diff line change 33
33
description : " Snapshot version '0.2.0-SNAPSHOT' (without 'v')"
34
34
required : true
35
35
36
+ permissions :
37
+ contents : write
38
+ pull-requests : write
39
+ issues : write
40
+
36
41
jobs :
37
42
create_release_pr :
38
43
name : Create release PR (job)
41
46
- name : Check versions
42
47
run : |
43
48
echo "Checking release version..."
44
- if echo ${{ github.event.inputs.release_version }} | grep --invert-match '^[0-9]\+\.[0-9]\+\.[0-9]\+$' > /dev/null; then
49
+ if echo ${{ github.event.inputs.release_version }} | '^[0-9]\+\.[0-9]\+\.[0-9]\+\(-\(alpha\|beta\|rc[0-9]\+\)\)\? $' > /dev/null; then
45
50
echo "Release version is invalid"
46
51
exit 1
47
52
fi
58
63
ref : master
59
64
fetch-depth : 0
60
65
66
+ - name : Set up JDK 8
67
+ uses : actions/setup-java@v4
68
+ with :
69
+ distribution : ' adopt'
70
+ java-version : 8
71
+ cache : maven
72
+
61
73
- name : Create release commits
62
74
run : |
63
75
git config --local user.name "GitHub Action"
You can’t perform that action at this time.
0 commit comments