From b00815c1f198e5ecdac7606b151aef17deb83cd6 Mon Sep 17 00:00:00 2001 From: John Doe Date: Sat, 14 Mar 2026 21:05:47 -0400 Subject: [PATCH] Fix: create git tag before creating release for manual workflow_dispatch runs --- .github/workflows/build-drop-tarball.yml | 12 ++++++++++++ .github/workflows/build-ragflow-tarball.yml | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/build-drop-tarball.yml b/.github/workflows/build-drop-tarball.yml index 558a877..51d4cce 100644 --- a/.github/workflows/build-drop-tarball.yml +++ b/.github/workflows/build-drop-tarball.yml @@ -213,6 +213,10 @@ jobs: contents: write steps: + - name: Checkout this repository for release + if: github.event_name != 'release' + uses: actions/checkout@v4 + - name: Get version for manual build id: version if: github.event_name != 'release' @@ -220,6 +224,14 @@ jobs: VERSION=$(date +%m-%d-%Y) echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Create tag for manual build + if: github.event_name != 'release' + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git tag -a "v${{ steps.version.outputs.version }}" -m "Drop build ${{ steps.version.outputs.version }}" + git push origin "v${{ steps.version.outputs.version }}" + - name: Create release for manual build if: github.event_name != 'release' uses: softprops/action-gh-release@v2 diff --git a/.github/workflows/build-ragflow-tarball.yml b/.github/workflows/build-ragflow-tarball.yml index 7735fd8..8c49547 100644 --- a/.github/workflows/build-ragflow-tarball.yml +++ b/.github/workflows/build-ragflow-tarball.yml @@ -312,6 +312,10 @@ jobs: contents: write steps: + - name: Checkout this repository for release + if: github.event_name != 'release' + uses: actions/checkout@v4 + - name: Get version for manual build id: version if: github.event_name != 'release' @@ -319,6 +323,14 @@ jobs: VERSION=$(date +%m-%d-%Y) echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Create tag for manual build + if: github.event_name != 'release' + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git tag -a "v${{ steps.version.outputs.version }}" -m "RAGFlow build ${{ steps.version.outputs.version }}" + git push origin "v${{ steps.version.outputs.version }}" + - name: Create release for manual build if: github.event_name != 'release' uses: softprops/action-gh-release@v2