ci: use package token for Gitea upload
Some checks failed
Cross Build Windows Release on Linux / cross-build-windows (push) Failing after 1m43s

This commit is contained in:
luochen570
2026-05-30 01:11:00 +08:00
parent 5c0f1a1409
commit f8449a5480
2 changed files with 5 additions and 11 deletions

View File

@@ -137,12 +137,14 @@ jobs:
VERSION="${VERSION:0:10}"
OWNER="${GITHUB_REPOSITORY%%/*}"
API_BASE="${GITHUB_SERVER_URL:-https://git.luochen570.cn}/api/packages/${OWNER}/generic/chengnan/${VERSION}"
TOKEN="${GITHUB_TOKEN:-${GITEA_TOKEN:-}}"
TOKEN="${GITEA_TOKEN:-${GITHUB_TOKEN:-}}"
test -n "$TOKEN"
curl --fail --location --user "${GITHUB_ACTOR:-luochen570}:${TOKEN}" \
curl --fail --show-error --silent --location \
--header "Authorization: token ${TOKEN}" \
--upload-file "dist-windows-cross/${PACKAGE_NAME}.zip" \
"${API_BASE}/${PACKAGE_NAME}.zip"
curl --fail --location --user "${GITHUB_ACTOR:-luochen570}:${TOKEN}" \
curl --fail --show-error --silent --location \
--header "Authorization: token ${TOKEN}" \
--upload-file "dist-windows-cross/${PACKAGE_NAME}.zip.sha256" \
"${API_BASE}/${PACKAGE_NAME}.zip.sha256"
echo "Package uploaded to: ${API_BASE}/"

View File

@@ -1,14 +1,6 @@
name: Build Windows Release
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
workflow_dispatch:
jobs: