ci: use package token for Gitea upload
Some checks failed
Cross Build Windows Release on Linux / cross-build-windows (push) Failing after 1m43s
Some checks failed
Cross Build Windows Release on Linux / cross-build-windows (push) Failing after 1m43s
This commit is contained in:
@@ -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}/"
|
||||
|
||||
Reference in New Issue
Block a user