From 068379af26c3cd33d3ff3a08e0ef16d06610bcc3 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 11 Jul 2024 01:50:54 +0800 Subject: [PATCH] fix(github-actions): remove redundant LATEST_TAG assignment in tag_after_testThe LATEST_TAG variable is no longer explicitly assigned within the determine_next_version step, simplifying the workflow and avoiding potential issues with variable scope and redundancy. --- .github/workflows/tag_after_test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tag_after_test.yml b/.github/workflows/tag_after_test.yml index f7290c9..69ceb0c 100644 --- a/.github/workflows/tag_after_test.yml +++ b/.github/workflows/tag_after_test.yml @@ -63,7 +63,8 @@ jobs: - name: Determine next version id: determine_next_version run: | - if [[ -z "${{ steps.check_tags.outputs.LATEST_TAG }}" ]]; then + LATEST_TAG=${{ steps.check_tags.outputs.LATEST_TAG }} + if [[ -z "$LATEST_TAG" ]]; then NEXT_TAG="v0.0.1" else VERSION_ARRAY=(${{ steps.check_tags.outputs.LATEST_TAG }#.v}~'.') @@ -89,7 +90,7 @@ jobs: echo "CHANGELOG=$CHANGELOG" >> $GITHUB_OUTPUT - name: Create release - if: ${{ steps.determine_next_version.outputs.NEXT_TAG != '' }} + if: ${{ steps.determine_next_version.outputs.NEXT_TAG }} uses: softprops/action-gh-release@v2 with: tag_name: ${{ steps.determine_next_version.outputs.NEXT_TAG }}