From e4b349d283ee957189459969e5407ec6f79938f0 Mon Sep 17 00:00:00 2001 From: edraft Date: Tue, 11 Mar 2025 23:25:09 +0100 Subject: [PATCH] Push tags correctly --- .gitea/workflows/build dev.yaml | 6 ++++-- .gitea/workflows/build.yaml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/build dev.yaml b/.gitea/workflows/build dev.yaml index d639d54..9e77bad 100644 --- a/.gitea/workflows/build dev.yaml +++ b/.gitea/workflows/build dev.yaml @@ -17,19 +17,21 @@ jobs: - name: Get Date and Build Number run: | + git fetch + git tag DATE=$(date +'%Y.%m.%d') - git fetch --tags TAG_COUNT=$(git tag -l "${DATE}.*" | wc -l) BUILD_NUMBER=$(($TAG_COUNT + 1)) BUILD_VERSION="${DATE}.${BUILD_NUMBER}-dev" echo "$BUILD_VERSION" > version.txt + echo "VERSION $BUILD_VERSION" - name: Create Git Tag for Build run: | git config user.name "ci" git config user.email "dev@sh-edraft.de" git tag ${{ env.BUILD_VERSION }} - git push origin ${{ env.BUILD_VERSION }} --tags + git push origin --tags - name: Upload build version artifact uses: actions/upload-artifact@v3 diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 71ff017..02316c1 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -17,19 +17,21 @@ jobs: - name: Get Date and Build Number run: | + git fetch + git tag DATE=$(date +'%Y.%m.%d') - git fetch --tags TAG_COUNT=$(git tag -l "${DATE}.*" | wc -l) BUILD_NUMBER=$(($TAG_COUNT + 1)) BUILD_VERSION="${DATE}.${BUILD_NUMBER}" echo "$BUILD_VERSION" > version.txt + echo "VERSION $BUILD_VERSION" - name: Create Git Tag for Build run: | git config user.name "ci" git config user.email "dev@sh-edraft.de" git tag ${{ env.BUILD_VERSION }} - git push origin ${{ env.BUILD_VERSION }} --tags + git push origin --tags - name: Upload build version artifact uses: actions/upload-artifact@v3