From af74fdeb841ee2911110bf428a54434add245641 Mon Sep 17 00:00:00 2001 From: Jonathan Daniel Date: Fri, 1 Nov 2024 18:58:46 +0200 Subject: [PATCH 1/2] Use `uv publish` instead of `uvx twine` https://docs.astral.sh/uv/guides/publish/#publishing-your-package --- .github/workflows/release.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 72a6307..cb8c516 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,7 @@ jobs: runs-on: ubuntu-latest env: PYPI_PUBLISH: true + FORCE_COLOR: 1 steps: - uses: actions/checkout@v4 with: @@ -30,14 +31,12 @@ jobs: with: version: ${{ steps.uv-version.outputs.version }} - name: Build the package - env: - FORCE_COLOR: 1 - run: uv build + run: uv build --no-sources - name: Publish the package env: - TWINE_PASSWORD: ${{ inputs.repository == 'pypi' && secrets.PYPI_TOKEN || secrets.TEST_PYPI_TOKEN }} - TWINE_REPOSITORY: ${{ inputs.repository }} - run: uvx twine upload dist/* + UV_PUBLISH_TOKEN: ${{ inputs.repository == 'pypi' && secrets.PYPI_TOKEN || secrets.TEST_PYPI_TOKEN }} + UV_PUBLISH_URL: ${{ inputs.repository }} + run: uv publish - name: Upload source and wheel distributions uses: actions/upload-artifact@v4 with: From 4de25301cc6501e800ca68af8af2103e5bdb9616 Mon Sep 17 00:00:00 2001 From: Jonathan Daniel Date: Sat, 2 Nov 2024 20:34:04 +0200 Subject: [PATCH 2/2] Fix publish URL --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cb8c516..a698e56 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -35,7 +35,7 @@ jobs: - name: Publish the package env: UV_PUBLISH_TOKEN: ${{ inputs.repository == 'pypi' && secrets.PYPI_TOKEN || secrets.TEST_PYPI_TOKEN }} - UV_PUBLISH_URL: ${{ inputs.repository }} + UV_PUBLISH_URL: ${{ inputs.repository == 'pypi' && 'https://upload.pypi.org/legacy/' || 'https://test.pypi.org/legacy/' }} run: uv publish - name: Upload source and wheel distributions uses: actions/upload-artifact@v4