From 6a854265713d5fb29e36d9b709133bbb2ec0e950 Mon Sep 17 00:00:00 2001 From: "isaprettycoolguy@protonmail.com" <6576516+nyxsys@users.noreply.github.com> Date: Fri, 15 May 2026 14:26:12 -0400 Subject: [PATCH] fix release workflow: skip tag push if tag exists, bump Node to lts/* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevented exit-128 crash when a fix commit pushes to master at the same version — the workflow now checks for an existing remote tag before attempting to push one, so the release step can still create the GitHub release even if the tag is already there. Also updated both workflows from node-version 20.x to lts/* ahead of the GitHub-enforced Node 24 migration deadline (2026-06-02). Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8cb2a08..3f918c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Use Node.js uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version: "lts/*" cache: "npm" - name: Install dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f28677..71b790b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,12 +29,17 @@ jobs: else echo "exists=false" >> $GITHUB_OUTPUT fi + if git ls-remote --tags origin "${{ steps.version.outputs.version }}" | grep -q .; then + echo "tag_exists=true" >> $GITHUB_OUTPUT + else + echo "tag_exists=false" >> $GITHUB_OUTPUT + fi - name: Use Node.js if: steps.check.outputs.exists == 'false' uses: actions/setup-node@v4 with: - node-version: "20.x" + node-version: "lts/*" cache: "npm" - name: Install dependencies @@ -57,8 +62,10 @@ jobs: version="${{ steps.version.outputs.version }}" git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git tag -a "$version" -m "$version" - git push origin "$version" + if [ "${{ steps.check.outputs.tag_exists }}" != "true" ]; then + git tag -a "$version" -m "$version" + git push origin "$version" + fi gh release create "$version" \ --title="$version" \ --generate-notes \