Skip to content

🔖 Version 4.15.0 #15

🔖 Version 4.15.0

🔖 Version 4.15.0 #15

Workflow file for this run

name: Tag Version
on:
push:
branches:
- tag-test
jobs:
tag-version:
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, ':bookmark: Version ')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Tag version
run: |
msg_start=':bookmark: Version '
version_format='[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}'
version=$(git log -1 --skip=0 --pretty=%s | grep -oP "(?<=${msg_start})${version_format}")
if [ -z "${version}" ]; then
echo 'Version not found, exiting.'
exit 0
fi
echo "Found version: ${version}";
tag="v${version}";
echo "Would tag: ${tag}";
existing_tag=$(git tag -l "${tag}");
if [ "${existing_tag}" ]; then
echo "Tag '${existing_tag}' already exists, aborting.";
exit 1;
fi