From 2d881cc9a87cbeff27957a8955d66fa8ad0ba694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20P=C3=A9rez-Garc=C3=ADa?= Date: Thu, 5 Dec 2024 21:55:20 +0000 Subject: [PATCH 1/6] Try publishing with uv --- .github/workflows/publish.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 579ee85cd..23a626435 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,19 +30,22 @@ jobs: id-token: write steps: + - name: Print ref + run: echo ${{ github.ref }} + - name: Download all workflow run artifacts uses: actions/download-artifact@v4 with: name: dist path: dist + - name: Install uv + uses: astral-sh/setup-uv@v4 + - name: Publish package to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - skip-existing: true + run: uv publish --publish-url https://test.pypi.org/legacy/ - - name: Publish TorchIO to PyPI if commit is tagged + - name: Publish package to PyPI if commit is tagged # Publish only tagged commits if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@release/v1 + run: uv publish From f9f8b08558b2d1d5642362207c76a715251e760c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20P=C3=A9rez-Garc=C3=ADa?= Date: Thu, 5 Dec 2024 22:15:05 +0000 Subject: [PATCH 2/6] Revert using uv for TestPyPI --- .github/workflows/publish.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 23a626435..e32e90328 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,12 +39,16 @@ jobs: name: dist path: dist + - name: Publish package to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + skip-existing: true + - name: Install uv + if: startsWith(github.ref, 'refs/tags') uses: astral-sh/setup-uv@v4 - - name: Publish package to TestPyPI - run: uv publish --publish-url https://test.pypi.org/legacy/ - - name: Publish package to PyPI if commit is tagged # Publish only tagged commits if: startsWith(github.ref, 'refs/tags') From 555abf534966c17bffe6efa72e4872af9eff865b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20P=C3=A9rez-Garc=C3=ADa?= Date: Thu, 5 Dec 2024 22:26:20 +0000 Subject: [PATCH 3/6] Try again uv for uploading to TestPyPI --- .github/workflows/publish.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e32e90328..808cf705a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,16 +39,15 @@ jobs: name: dist path: dist - - name: Publish package to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - skip-existing: true - - name: Install uv - if: startsWith(github.ref, 'refs/tags') uses: astral-sh/setup-uv@v4 + - name: Publish package to TestPyPI + run: | + uv publish \ + --check-url https://test.pypi.org/simple \ + --publish-url https://test.pypi.org/legacy + - name: Publish package to PyPI if commit is tagged # Publish only tagged commits if: startsWith(github.ref, 'refs/tags') From cd8c22d503853feff0b23e992316494ef18332bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20P=C3=A9rez-Garc=C3=ADa?= Date: Thu, 5 Dec 2024 22:26:38 +0000 Subject: [PATCH 4/6] Add verbosity --- .github/workflows/publish.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 808cf705a..67e1929d9 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -46,9 +46,10 @@ jobs: run: | uv publish \ --check-url https://test.pypi.org/simple \ - --publish-url https://test.pypi.org/legacy + --publish-url https://test.pypi.org/legacy \ + --verbose - name: Publish package to PyPI if commit is tagged # Publish only tagged commits if: startsWith(github.ref, 'refs/tags') - run: uv publish + run: uv publish --verbose From 32f169dc3bac1d00275eb40cfcfe1199a985aed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20P=C3=A9rez-Garc=C3=ADa?= Date: Thu, 5 Dec 2024 22:44:10 +0000 Subject: [PATCH 5/6] Revert "Try again uv for uploading to TestPyPI" This reverts commit 555abf534966c17bffe6efa72e4872af9eff865b. --- .github/workflows/publish.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 67e1929d9..1aa30b784 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,16 +39,16 @@ jobs: name: dist path: dist + - name: Publish package to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + skip-existing: true + - name: Install uv + if: startsWith(github.ref, 'refs/tags') uses: astral-sh/setup-uv@v4 - - name: Publish package to TestPyPI - run: | - uv publish \ - --check-url https://test.pypi.org/simple \ - --publish-url https://test.pypi.org/legacy \ - --verbose - - name: Publish package to PyPI if commit is tagged # Publish only tagged commits if: startsWith(github.ref, 'refs/tags') From 56026d8dca93de576cdc8fb86ed470a75d356355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20P=C3=A9rez-Garc=C3=ADa?= Date: Thu, 5 Dec 2024 22:56:29 +0000 Subject: [PATCH 6/6] Improve step name --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1aa30b784..b55bcc82b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,7 +45,7 @@ jobs: repository-url: https://test.pypi.org/legacy/ skip-existing: true - - name: Install uv + - name: Install uv if commit is tagged if: startsWith(github.ref, 'refs/tags') uses: astral-sh/setup-uv@v4