From f8449a548045a0c134d0e107699f928256fcf11c Mon Sep 17 00:00:00 2001 From: luochen570 <1160510664@qq.com> Date: Sat, 30 May 2026 01:11:00 +0800 Subject: [PATCH] ci: use package token for Gitea upload --- .gitea/workflows/build-windows-cross-linux.yml | 8 +++++--- .gitea/workflows/build-windows-release.yml | 8 -------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/build-windows-cross-linux.yml b/.gitea/workflows/build-windows-cross-linux.yml index 0e940c1..395aeef 100644 --- a/.gitea/workflows/build-windows-cross-linux.yml +++ b/.gitea/workflows/build-windows-cross-linux.yml @@ -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}/" diff --git a/.gitea/workflows/build-windows-release.yml b/.gitea/workflows/build-windows-release.yml index cb85cf6..d7ebb18 100644 --- a/.gitea/workflows/build-windows-release.yml +++ b/.gitea/workflows/build-windows-release.yml @@ -1,14 +1,6 @@ name: Build Windows Release on: - push: - branches: - - main - tags: - - 'v*' - pull_request: - branches: - - main workflow_dispatch: jobs: