From 10aa542dd83f4099487eefd1aac1e82801ad6481 Mon Sep 17 00:00:00 2001 From: Mindee Date: Fri, 27 Dec 2024 12:56:12 +0100 Subject: [PATCH] :recycle: use separate repo for tagging action --- .github/workflows/tag-version.yml | 40 ++----------------------------- 1 file changed, 2 insertions(+), 38 deletions(-) diff --git a/.github/workflows/tag-version.yml b/.github/workflows/tag-version.yml index 8a669f0e..31194379 100644 --- a/.github/workflows/tag-version.yml +++ b/.github/workflows/tag-version.yml @@ -6,41 +6,5 @@ on: - main jobs: - tag-version: - runs-on: ubuntu-latest - if: "contains(github.event.head_commit.message, ':bookmark:')" - - 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, aborting.' - exit 1 - 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 - - git config user.name "Mindee"; - git config user.email "opensource@mindee.com" - - git tag -a "${tag}" -m"Version ${version}"; - git push origin "${tag}" - - echo "Tagged and pushed: ${tag}" + tag: + uses: mindee/client-lib-actions/.github/workflows/tag-version.yml@main