fix(release): guard duplicate clawhub versions and bump watchdog to 0.1.4 (#201)

This commit is contained in:
davida-ps
2026-04-17 10:07:45 +03:00
committed by GitHub
parent 4d3fe1bf10
commit d0fe8c59c4
4 changed files with 41 additions and 12 deletions
+32 -10
View File
@@ -1135,6 +1135,36 @@ jobs:
CLAWHUB_DISABLE_TELEMETRY=1 CLAWHUB_SITE="$SITE" CLAWHUB_REGISTRY="$REGISTRY" \ CLAWHUB_DISABLE_TELEMETRY=1 CLAWHUB_SITE="$SITE" CLAWHUB_REGISTRY="$REGISTRY" \
clawhub login --token "$CLAWHUB_TOKEN" --site "$SITE" --no-input clawhub login --token "$CLAWHUB_TOKEN" --site "$SITE" --no-input
- name: Guard duplicate ClawHub version
if: needs.release-tag.outputs.publishable == 'true' && env.CLAWHUB_TOKEN != ''
run: |
set -euo pipefail
SITE=${CLAWHUB_SITE:-https://clawhub.ai}
REGISTRY=${CLAWHUB_REGISTRY:-$SITE}
SKILL_NAME="${{ needs.release-tag.outputs.skill_name }}"
VERSION="${{ needs.release-tag.outputs.version }}"
export CLAWHUB_CONFIG_PATH="$HOME/.clawhub-ci/config.json"
set +e
CLAWHUB_DISABLE_TELEMETRY=1 CLAWHUB_SITE="$SITE" CLAWHUB_REGISTRY="$REGISTRY" \
clawhub inspect "$SKILL_NAME" --version "$VERSION" --json \
> /tmp/clawhub-existing-version.json 2> /tmp/clawhub-existing-version.err
STATUS=$?
set -e
if [ "$STATUS" -eq 0 ]; then
echo "::error::ClawHub already contains ${SKILL_NAME}@${VERSION}. Bump the version before tagging."
exit 1
fi
if grep -Eqi "Version not found|Skill not found" /tmp/clawhub-existing-version.err; then
echo "No existing ${SKILL_NAME}@${VERSION} detected in ClawHub. Proceeding."
else
echo "::error::Failed to verify ClawHub version precondition."
cat /tmp/clawhub-existing-version.err
exit 1
fi
- name: Publish to ClawHub - name: Publish to ClawHub
if: needs.release-tag.outputs.publishable == 'true' && env.CLAWHUB_TOKEN != '' if: needs.release-tag.outputs.publishable == 'true' && env.CLAWHUB_TOKEN != ''
run: | run: |
@@ -1149,7 +1179,6 @@ jobs:
export CLAWHUB_CONFIG_PATH="$HOME/.clawhub-ci/config.json" export CLAWHUB_CONFIG_PATH="$HOME/.clawhub-ci/config.json"
# Publish with idempotent retry handling
if ! CLAWHUB_DISABLE_TELEMETRY=1 CLAWHUB_SITE="$SITE" CLAWHUB_REGISTRY="$REGISTRY" \ if ! CLAWHUB_DISABLE_TELEMETRY=1 CLAWHUB_SITE="$SITE" CLAWHUB_REGISTRY="$REGISTRY" \
clawhub publish "$SKILL_PATH" \ clawhub publish "$SKILL_PATH" \
--slug "$SKILL_NAME" \ --slug "$SKILL_NAME" \
@@ -1158,15 +1187,8 @@ jobs:
--changelog "$CHANGELOG" \ --changelog "$CHANGELOG" \
--tags "latest" \ --tags "latest" \
--no-input 2>&1 | tee /tmp/clawhub-publish.log; then --no-input 2>&1 | tee /tmp/clawhub-publish.log; then
echo "::error::ClawHub publish failed. Check logs above for details."
# Check if it's a "version already exists" error (which means previous run partially succeeded) exit 1
if grep -qi "version already exists" /tmp/clawhub-publish.log; then
echo "::warning::Version $VERSION already published to ClawHub (from previous run)"
exit 0
else
echo "::error::ClawHub publish failed. Check logs above for details."
exit 1
fi
fi fi
echo "✓ Successfully published $SKILL_NAME@$VERSION to ClawHub" echo "✓ Successfully published $SKILL_NAME@$VERSION to ClawHub"
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.1.4] - 2026-04-17
### Changed
- Re-released metadata and docs updates under a new version after detecting that `0.1.3` was already present in ClawHub with older artifact content.
- No runtime behavior changes to audit execution, cron setup, or report delivery logic.
## [0.1.3] - 2026-04-16 ## [0.1.3] - 2026-04-16
### Changed ### Changed
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: openclaw-audit-watchdog name: openclaw-audit-watchdog
version: 0.1.3 version: 0.1.4
description: Automated daily security audits for OpenClaw agents with DM delivery and optional email reporting. Runs deep audits, creates or updates a recurring cron job, and sends formatted reports to configured recipients. description: Automated daily security audits for OpenClaw agents with DM delivery and optional email reporting. Runs deep audits, creates or updates a recurring cron job, and sends formatted reports to configured recipients.
homepage: https://clawsec.prompt.security homepage: https://clawsec.prompt.security
metadata: metadata:
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "openclaw-audit-watchdog", "name": "openclaw-audit-watchdog",
"version": "0.1.3", "version": "0.1.4",
"description": "Automated daily security audits for OpenClaw agents with DM delivery and optional email reporting. Creates or updates an unattended cron job and sends formatted reports to configured recipients.", "description": "Automated daily security audits for OpenClaw agents with DM delivery and optional email reporting. Creates or updates an unattended cron job and sends formatted reports to configured recipients.",
"author": "prompt-security", "author": "prompt-security",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",