From 507df8cdd0baae63fd30cf4a05df4619dbd77e0e Mon Sep 17 00:00:00 2001 From: AmaseCocoa Date: Tue, 9 Jul 2024 00:12:41 +0900 Subject: [PATCH] fix --- .github/workflows/upload.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.github/workflows/upload.yml b/.github/workflows/upload.yml index c2c8360..5cfe1ba 100644 --- a/.github/workflows/upload.yml +++ b/.github/workflows/upload.yml @@ -28,21 +28,15 @@ jobs: run: | git config --global user.name 'github-actions[bot]' git config --global user.email 'github-actions[bot]@users.noreply.github.com' - - - name: Create or switch to release branch - run: | - git checkout -B release - - name: Copy files from tag - run: | - TAG_NAME=$(git describe --tags --abbrev=0) - git checkout $TAG_NAME -- . - - name: Commit changes - run: | - git add -A - git commit -m "Update release branch to $TAG_NAME" - - name: Push to release branch - run: | - git push origin release --force + - name: Get current tag name + id: get_tag + run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + - name: Checkout release branch + run: git checkout release + - name: Merge tag to release branch + run: git merge ${{ env.TAG_NAME }} --no-ff -m "Release v${{ env.TAG_NAME }}" + - name: Push changes to release branch + run: git push origin release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: echo version