From bc4ad22dadc48c836d04a738f228436651ca8ad6 Mon Sep 17 00:00:00 2001 From: EstrellaXD Date: Sun, 24 Sep 2023 13:55:13 +0800 Subject: [PATCH] fix: ci problem. --- .github/workflows/build.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0abede97..442e4e28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,12 +58,14 @@ jobs: - name: Check version id: version run: | - if [[ '${{ github.event_name }}' == 'pull_request' && ${{ github.event.pull_request.merged }} == true ]]; then - echo "version=${{ github.event.pull_request.title }}" >> $GITHUB_OUTPUT - git config --local user.email "action@github.com" - git config --local user.name "github-actions" - git tag ${{ github.event.pull_request.title }} - git push origin ${{ github.event.pull_request.title }} + if [ '${{ github.event_name }}' == 'pull_request']; then + if [ ${{ github.event.pull_request.merged }} == true ]; then + echo "version=${{ github.event.pull_request.title }}" >> $GITHUB_OUTPUT + git config --local user.email "action@github.com" + git config --local user.name "github-actions" + git tag ${{ github.event.pull_request.title }} + git push origin ${{ github.event.pull_request.title }} + fi elif [[ ${{ github.event_name }} == 'push' && (${{ github.ref }} == *'alpha'* || ${{ github.ref }} == *'beta'*) ]]; then echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT else