fix: use curl to create release instead of external action
Some checks failed
Release / build (push) Failing after 5m9s

This commit is contained in:
2026-04-07 08:00:28 +08:00
parent cd90a9c1b3
commit 1d12134314

View File

@@ -37,9 +37,20 @@ jobs:
run: sha256sum yoo-* > checksums.txt
- name: Release
uses: titor/gitea-release-action@v1
with:
files: |
yoo-*
checksums.txt
token: ${{ secrets.release_token }}
env:
GITEA_TOKEN: ${{ secrets.release_token }}
GITEA_REPO: ${{ github.repository }}
TAG_NAME: ${{ github.ref_name }}
run: |
# 创建 Release
curl -s -X POST "https://hub.gaomia.site/api/v1/repos/${GITEA_REPO}/releases" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"${TAG_NAME#refs/tags/}\",\"name\":\"${TAG_NAME#refs/tags/}\",\"body\":\"Automated release\"}"
# 上传产物
for f in yoo-* checksums.txt; do
[ -f "$f" ] && curl -s -X POST "https://hub.gaomia.site/api/v1/repos/${GITEA_REPO}/releases/upload?name=${TAG_NAME#refs/tags/}" \
-H "Authorization: token ${GITEA_TOKEN}" \
-F "attachment=@$f"
done