mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Test publishing with pypa/gh-action-pypi-publish (#12742)
A publish testing for #11652
This commit is contained in:
parent
09129031a4
commit
c7c9b7a90e
1 changed files with 21 additions and 0 deletions
21
.github/workflows/ci.yml
vendored
21
.github/workflows/ci.yml
vendored
|
@ -1454,6 +1454,27 @@ jobs:
|
|||
- name: "Prepare binary"
|
||||
run: chmod +x ./uv
|
||||
|
||||
- name: "Build astral-test-pypa-gh-action"
|
||||
run: |
|
||||
# Build a yet unused version of `astral-test-pypa-gh-action`
|
||||
mkdir astral-test-pypa-gh-action
|
||||
cd astral-test-pypa-gh-action
|
||||
../uv init --package
|
||||
# Get the latest patch version
|
||||
patch_version=$(curl https://test.pypi.org/simple/astral-test-pypa-gh-action/?format=application/vnd.pypi.simple.v1+json | jq --raw-output '.files[-1].filename' | sed 's/astral_test_pypa_gh_action-0\.1\.\([0-9]\+\)\.tar\.gz/\1/')
|
||||
# Set the current version to one higher (which should be unused)
|
||||
sed -i "s/0.1.0/0.1.$((patch_version + 1))/g" pyproject.toml
|
||||
../uv build
|
||||
|
||||
- name: "Publish astral-test-pypa-gh-action"
|
||||
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # release/v1
|
||||
with:
|
||||
# With this GitHub action, we can't do as rigid checks as with our custom Python script, so we publish more
|
||||
# leniently
|
||||
skip-existing: "true"
|
||||
repository-url: "https://test.pypi.org/legacy/"
|
||||
packages-dir: "astral-test-pypa-gh-action/dist"
|
||||
|
||||
- name: "Add password to keyring"
|
||||
run: |
|
||||
# `keyrings.alt` contains the plaintext keyring
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue