Publish: Warn when keyring has no password (#8827)

When trying to upload without a password but with the keyring, check
that the keyring has a password for the upload URL and username and warn
if it doesn't.

Fixes #8781
This commit is contained in:
konsti
2024-11-27 20:54:49 +01:00
committed by GitHub
parent 68e3228f2b
commit 0b0d0f44f8
6 changed files with 166 additions and 10 deletions

View File

@@ -1164,7 +1164,7 @@ jobs:
- name: "Add password to keyring"
run: |
# `keyrings.alt` contains the plaintext keyring
./uv tool install --with keyrings.alt "keyring<25.4.0" # TODO(konsti): Remove upper bound once fix is released
./uv tool install --with keyrings.alt keyring
echo $UV_TEST_PUBLISH_KEYRING | keyring set https://test.pypi.org/legacy/?astral-test-keyring __token__
env:
UV_TEST_PUBLISH_KEYRING: ${{ secrets.UV_TEST_PUBLISH_KEYRING }}