mirror of
https://github.com/prompt-security/clawsec.git
synced 2026-06-13 05:28:02 +03:00
fix(release): guard duplicate clawhub versions and bump watchdog to 0.1.4 (#201)
This commit is contained in:
@@ -1135,6 +1135,36 @@ jobs:
|
||||
CLAWHUB_DISABLE_TELEMETRY=1 CLAWHUB_SITE="$SITE" CLAWHUB_REGISTRY="$REGISTRY" \
|
||||
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
|
||||
if: needs.release-tag.outputs.publishable == 'true' && env.CLAWHUB_TOKEN != ''
|
||||
run: |
|
||||
@@ -1149,7 +1179,6 @@ jobs:
|
||||
|
||||
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" \
|
||||
clawhub publish "$SKILL_PATH" \
|
||||
--slug "$SKILL_NAME" \
|
||||
@@ -1158,16 +1187,9 @@ jobs:
|
||||
--changelog "$CHANGELOG" \
|
||||
--tags "latest" \
|
||||
--no-input 2>&1 | tee /tmp/clawhub-publish.log; then
|
||||
|
||||
# Check if it's a "version already exists" error (which means previous run partially succeeded)
|
||||
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
|
||||
|
||||
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/),
|
||||
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
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
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.
|
||||
homepage: https://clawsec.prompt.security
|
||||
metadata:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"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.",
|
||||
"author": "prompt-security",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
|
||||
Reference in New Issue
Block a user