Compare commits

..

1 Commits

Author SHA1 Message Date
edaac8aa45 chore: auto release commit (2026-03-24 18:22:46)
All checks were successful
技能自动化发布 (测试版-无鉴权) / build-and-deploy (push) Successful in 9s
2026-03-24 18:22:46 +08:00

View File

@@ -108,4 +108,31 @@ jobs:
exit(1)
if payload.get('code') != 200:
exit(1)
"
# 7. 清理旧版本只保留最新1个
- name: Prune Old Versions
env:
SLUG: ${{ steps.build_task.outputs.slug }}
VERSION: ${{ steps.build_task.outputs.version }}
run: |
python -c "
import requests, os
url = 'https://jc2009.com/api/artifacts/prune-old-versions'
payload = {
'name': os.environ['SLUG'],
'artifact_type': 'skill',
'keep_count': 1,
'protect_version': os.environ['VERSION']
}
res = requests.post(url, json=payload)
print(f'Prune Result: {res.text}')
if res.status_code != 200:
exit(1)
try:
body = res.json()
except Exception:
exit(1)
if body.get('code') != 200:
exit(1)
"