From 3beb944d1e39809b4ec561d2eaf90570ad9a3746 Mon Sep 17 00:00:00 2001 From: Yidi Date: Thu, 26 Sep 2024 21:39:51 -0400 Subject: [PATCH] fix(workflow): simplify release process by removing redundant checks The release-on-tag workflow has been streamlined by eliminating the redundant steps checking for existing releases. This change reduces complexity and speeds up the release process by directly creating a release on every tag push without prior existence verification. --- .github/workflows/release-on-tag.yml | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/.github/workflows/release-on-tag.yml b/.github/workflows/release-on-tag.yml index dae1d9af..3868a8f5 100644 --- a/.github/workflows/release-on-tag.yml +++ b/.github/workflows/release-on-tag.yml @@ -10,32 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: Check if Release Exists - id: check_release - uses: actions/github-script@v7 - with: - script: | - try { - await github.rest.repos.getReleaseByTag({ - owner: context.repo.owner, - repo: context.repo.repo, - tag: context.ref.replace('refs/tags/', ''), - }) - return 'true' - } catch (error) { - if (error.status === 404) { - return 'false' - } else { - throw error - } - } - result-encoding: string - - - name: Print release_exists output - run: echo "release_exists is ${{ steps.check_release.outputs.result }}" - - name: Create Release - if: steps.check_release.outputs.result == 'false' uses: actions/create-release@v1 with: tag_name: ${{ github.ref_name }}