chore: auto release commit (2026-03-24 18:22:46)
All checks were successful
技能自动化发布 (测试版-无鉴权) / build-and-deploy (push) Successful in 9s
All checks were successful
技能自动化发布 (测试版-无鉴权) / build-and-deploy (push) Successful in 9s
This commit is contained in:
27
.github/workflows/release_skill.yaml
vendored
27
.github/workflows/release_skill.yaml
vendored
@@ -108,4 +108,31 @@ jobs:
|
|||||||
exit(1)
|
exit(1)
|
||||||
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)
|
||||||
"
|
"
|
||||||
Reference in New Issue
Block a user