ci(publish): use repository-level PACKAGE_TOKEN secret

This commit is contained in:
2026-05-06 18:15:22 +08:00
parent f55c7bdc52
commit cff1408d87

View File

@@ -6,10 +6,6 @@ on:
- 'v*' - 'v*'
workflow_dispatch: workflow_dispatch:
permissions:
contents: read
packages: write
jobs: jobs:
publish: publish:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -36,7 +32,7 @@ jobs:
- name: Publish to Gitea Package Registry - name: Publish to Gitea Package Registry
env: env:
TWINE_USERNAME: __token__ TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ github.token }} TWINE_PASSWORD: ${{ secrets.PACKAGE_TOKEN }}
run: | run: |
python3.12 -m twine upload \ python3.12 -m twine upload \
--repository-url https://git.jc2009.com/api/packages/client-jiangchang/pypi \ --repository-url https://git.jc2009.com/api/packages/client-jiangchang/pypi \