From edf2298e20b260d2f6522fe26f1fef0704fbe8db Mon Sep 17 00:00:00 2001 From: Latte Date: Sat, 27 Jun 2026 18:01:22 +0200 Subject: [PATCH] ci: authenticate twine with REGISTRY_TOKEN secret The repo already has a REGISTRY_TOKEN secret (Gitea access token with package scope); the workflow referenced a non-existent PACKAGE_REGISTRY_TOKEN and fell back to the auto GITHUB_TOKEN, which is not granted package-write, so every upload was rejected. Point twine at REGISTRY_TOKEN. Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 53c580d..f19bad5 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -69,10 +69,10 @@ jobs: - name: Publish to Gitea PyPI registry env: - # The auto-provided token works for the same owner's package registry. - # Override with a PACKAGE_REGISTRY_TOKEN secret if your instance needs it. + # REGISTRY_TOKEN is a Gitea access token with package read/write scope. + # The auto GITHUB_TOKEN is not granted package-write here, so we use it. TWINE_USERNAME: ${{ github.actor }} - TWINE_PASSWORD: ${{ secrets.PACKAGE_REGISTRY_TOKEN || secrets.GITHUB_TOKEN }} + TWINE_PASSWORD: ${{ secrets.REGISTRY_TOKEN }} run: | # Gitea's PyPI registry does not support twine's --skip-existing, so # we run a plain upload and tolerate an "already exists" conflict in