Use native release commands for each forge
Some checks failed
Test / test (push) Failing after 1m16s
Release / Check Version (push) Failing after 20s
Release / Build Extensions (push) Has been skipped

This commit is contained in:
2026-09-19 22:21:56 +08:00
parent 51d8aa37a6
commit fbc6080073
2 changed files with 18 additions and 5 deletions

View File

@@ -76,7 +76,19 @@ jobs:
- name: Publish Gitea release
if: github.server_url != 'https://github.com'
uses: https://gitea.com/actions/gitea-release-action@v1.3.6
with:
files: |-
dist/*.zip
env:
RELEASE_TOKEN: ${{ github.token }}
run: |
release_id="$(curl --fail-with-body \
--header "Authorization: token $RELEASE_TOKEN" \
--header "Content-Type: application/json" \
--data "$(jq -n --arg tag "$GITHUB_REF_NAME" '{tag_name: $tag, name: $tag}')" \
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases" | jq -r .id)"
for archive in dist/*.zip; do
curl --fail-with-body \
--request POST \
--header "Authorization: token $RELEASE_TOKEN" \
--header "Content-Type: application/octet-stream" \
--data-binary "@$archive" \
"$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/releases/$release_id/assets?name=$(basename "$archive")"
done