Skip to content

Commit 915b11c

Browse files
committed
Make npm publish idempotent
1 parent 784254c commit 915b11c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ jobs:
8080
if: github.event_name == 'push'
8181
run: |
8282
VERSION="${{ steps.get_version.outputs.VERSION }}"
83+
# Skip if this exact version is already published (idempotent reruns)
84+
if npm view xcodebuildmcp@"$VERSION" version >/dev/null 2>&1; then
85+
echo "✅ xcodebuildmcp@$VERSION already on NPM. Skipping publish."
86+
exit 0
87+
fi
8388
# Determine the appropriate npm tag based on version
8489
if [[ "$VERSION" == *"-beta"* ]]; then
8590
NPM_TAG="beta"

0 commit comments

Comments
 (0)