File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change 8
8
jobs :
9
9
tag-version :
10
10
runs-on : ubuntu-latest
11
+ if : " contains(github.event.head_commit.message, ':bookmark: Version ')"
12
+
11
13
steps :
12
14
- uses : actions/checkout@v4
13
15
14
- - name : Get version
15
- id : get_version
16
+ - name : Tag version
16
17
run : |
17
18
msg_start=':bookmark: Version '
18
- version=$(\
19
- git log -1 --skip=0 --pretty=%s |\
20
- grep -oP "(?<=${msg_start})[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}" |\
21
- true\
22
- )
19
+ version_format='[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}'
20
+ version=$(git log -1 --skip=0 --pretty=%s | grep -oP "(?<=${msg_start})${version_format}")
23
21
24
22
if [ -z "${version}" ]; then
25
23
echo 'Version not found, exiting.'
30
28
tag="v${version}";
31
29
32
30
echo "Would tag: ${tag}";
33
- existing_tag=$(git tag -l "$tag");
31
+ existing_tag=$(git tag -l "${tag}");
32
+ echo "git tag -l ${tag}";
33
+ echo "${existing_tag}";
34
+ echo "---";
35
+
34
36
if [ "${existing_tag}" ]; then
35
37
echo "Tag '${existing_tag}' already exists, aborting.";
36
38
exit 1;
You can’t perform that action at this time.
0 commit comments