allow same version when update the version
/ build_and_publish (release) Successful in 40s

This commit is contained in:
2025-08-16 18:33:17 +02:00
parent fe8d60cf64
commit b9d12555b5
+2 -2
View File
@@ -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 its 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)"