From b9d12555b521c58779062a1c21a78a8e86cc9e76 Mon Sep 17 00:00:00 2001 From: christoph_xd Date: Sat, 16 Aug 2025 18:33:17 +0200 Subject: [PATCH] allow same version when update the version --- .gitea/workflows/build_and_puplish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build_and_puplish.yml b/.gitea/workflows/build_and_puplish.yml index 1ccdcba..eb4ff8b 100644 --- a/.gitea/workflows/build_and_puplish.yml +++ b/.gitea/workflows/build_and_puplish.yml @@ -29,7 +29,7 @@ jobs: - name: Build Package Files run: npm run package - name: Update package.json Version - run: npm version ${{ github.ref_name }} --no-git-tag-version + run: npm version ${{ github.ref_name }} --no-git-tag-version --allow-same-version - name: Commit and Push Changes run: | git config user.name "${{ vars.USERNAME_GIT }}" @@ -40,7 +40,7 @@ jobs: # Get current branch; if detached, resolve to a remote branch that contains this commit BRANCH="$(git rev-parse --abbrev-ref HEAD)" if [[ "$BRANCH" == "HEAD" || -z "$BRANCH" ]]; then - # If target_commitish is a branch, use it; if it’s a SHA, find a branch that contains it + # If target_commitish is a branch, use it; if it's a SHA, find a branch that contains it CANDIDATE='${{ github.event.release.target_commitish }}' if [[ "$CANDIDATE" =~ ^[0-9a-f]{40}$ ]]; then BRANCH="$(git branch -r --contains "$GITHUB_SHA" | sed -n 's|.*origin/||p' | head -n1)"