chore: auto release commit (2026-03-24 18:22:46)

This commit is contained in:
2026-03-24 18:22:46 +08:00
parent 157f51c765
commit 6c23215158

View File

@@ -109,3 +109,30 @@ jobs:
if payload.get('code') != 200: if payload.get('code') != 200:
exit(1) 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)
"