76a9e7a0cc
Automation / Format (push) Waiting to run
Automation / File Labeler (push) Waiting to run
Automation / Gemini Reviewed (push) Waiting to run
Coverage / Coverage (push) Waiting to run
Publish OpenClaw Skills / publish (push) Has been cancelled
Audit / Security Audit (push) Has been cancelled
Automation / Gemini Review (push) Has been cancelled
CI / Detect Changes (push) Has been cancelled
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Nix (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Cargo Deny (push) Has been cancelled
CI / Verify Skills (push) Has been cancelled
CI / Lint Skills (push) Has been cancelled
CI / Build (Linux x86_64) (push) Has been cancelled
CI / Build (macos-latest, aarch64-apple-darwin) (push) Has been cancelled
CI / Build (macos-latest, x86_64-apple-darwin) (push) Has been cancelled
CI / Build (ubuntu-latest, aarch64-unknown-linux-gnu) (push) Has been cancelled
CI / Build (windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
CI / API Smoketest (push) Has been cancelled
Policy / Policy Check (push) Has been cancelled
Release (Changeset) / Release (push) Has been cancelled
18 lines
515 B
Bash
Executable File
18 lines
515 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Creates and pushes a git tag based on the version in package.json.
|
|
# Idempotent — skips if the tag already exists.
|
|
# Used by changesets/action as the publish command.
|
|
set -euo pipefail
|
|
|
|
VERSION=$(node -p "require('./package.json').version")
|
|
TAG="v${VERSION}"
|
|
|
|
if git rev-parse "$TAG" >/dev/null 2>&1 || git ls-remote --exit-code --tags origin "$TAG" >/dev/null 2>&1; then
|
|
echo "Tag $TAG already exists, skipping"
|
|
exit 0
|
|
fi
|
|
|
|
echo "Creating tag $TAG"
|
|
git tag "$TAG"
|
|
git push origin "$TAG"
|