Fix: create git tag before creating release for manual workflow_dispatch runs

This commit is contained in:
John Doe
2026-03-14 21:05:47 -04:00
parent fb55a17f27
commit b00815c1f1
2 changed files with 24 additions and 0 deletions
+12
View File
@@ -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
@@ -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