fix: use Gitea API directly for release creation and asset upload
Publish Release / build-net9 (push) Successful in 59s Details
Publish Release / build-net10 (push) Successful in 56s Details
Publish Release / release (push) Failing after 13s Details

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Filtik 2026-07-02 21:42:35 +02:00
parent ffbd1aea70
commit b193bfe98e
1 changed files with 22 additions and 7 deletions

View File

@ -96,10 +96,25 @@ jobs:
git diff --staged --quiet || git commit -m "chore: update manifest for ${{ github.ref_name }}" git diff --staged --quiet || git commit -m "chore: update manifest for ${{ github.ref_name }}"
git push origin HEAD:${{ github.event.repository.default_branch }} git push origin HEAD:${{ github.event.repository.default_branch }}
- name: Create release - name: Create release and upload assets
uses: softprops/action-gh-release@v1 run: |
with: API="${{ github.server_url }}/api/v1"
files: artifacts/**/*.zip REPO="${{ github.repository }}"
overwrite: true TAG="${{ github.ref_name }}"
env: TOKEN="${{ secrets.GITHUB_TOKEN }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Create release (or get existing)
RELEASE=$(curl -s -X POST "${API}/repos/${REPO}/releases" \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\"}")
RELEASE_ID=$(echo "${RELEASE}" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
# Upload assets
for file in artifacts/build-net9/*.zip artifacts/build-net10/*.zip; do
NAME=$(basename "${file}")
curl -s -X POST "${API}/repos/${REPO}/releases/${RELEASE_ID}/assets?name=${NAME}" \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/octet-stream" \
--data-binary "@${file}"
done