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