Compare commits
4 Commits
5f79eec3dd
..
v1.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 120b61a423 | |||
| cd16b7ea28 | |||
| afbdefa549 | |||
| f1e192c5d4 |
@@ -79,29 +79,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create Gitea release
|
- name: Create Gitea release
|
||||||
run: |
|
run: |
|
||||||
cat > /tmp/make_release.py << 'PYEOF'
|
python3 -c "import json,os; v=os.environ['VERSION']; img=os.environ['IMAGE']; notes=open('/tmp/release_notes.txt').read(); open('/tmp/release_body.json','w').write(json.dumps({'tag_name':'v'+v,'name':'Catalyst v'+v,'body':'### Changes\n\n'+notes+'\n\n### Image\n\n'+img+':'+v,'draft':False,'prerelease':False}))"
|
||||||
import json, os
|
|
||||||
v = os.environ['VERSION']
|
|
||||||
img = os.environ['IMAGE']
|
|
||||||
raw = open('/tmp/release_notes.txt').read().strip()
|
|
||||||
feats, fixes = [], []
|
|
||||||
for line in raw.splitlines():
|
|
||||||
msg = line.lstrip('- ').strip()
|
|
||||||
if msg.startswith('feat:'):
|
|
||||||
feats.append('- ' + msg[5:].strip())
|
|
||||||
elif msg.startswith('fix:'):
|
|
||||||
fixes.append('- ' + msg[4:].strip())
|
|
||||||
sections = []
|
|
||||||
if feats:
|
|
||||||
sections.append('### New Features\n\n' + '\n'.join(feats))
|
|
||||||
if fixes:
|
|
||||||
sections.append('### Bug Fixes\n\n' + '\n'.join(fixes))
|
|
||||||
notes = '\n\n'.join(sections) or '_No changes_'
|
|
||||||
body = notes + '\n\n### Image\n\n' + img + ':' + v
|
|
||||||
payload = {'tag_name': 'v'+v, 'name': 'Catalyst v'+v, 'body': body, 'draft': False, 'prerelease': False}
|
|
||||||
open('/tmp/release_body.json', 'w').write(json.dumps(payload))
|
|
||||||
PYEOF
|
|
||||||
python3 /tmp/make_release.py
|
|
||||||
curl -sf -X POST \
|
curl -sf -X POST \
|
||||||
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
-H "Authorization: token ${{ secrets.TOKEN }}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
|
|||||||
Reference in New Issue
Block a user