From ebdd09f620bff6ef288a8604eb601cb5fcda4f08 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 07:29:45 -0600 Subject: [PATCH 01/14] Fix publishing round 2 --- .github/workflows/pypi.yaml | 9 +++++---- .github/workflows/testpypi-release.yaml | 13 +++++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 04669376..3eb20894 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -7,6 +7,9 @@ on: jobs: deploy: runs-on: ubuntu-latest + permissions: + # IMPORTANT: this permission is mandatory for Trusted Publishing + id-token: write steps: - uses: actions/checkout@v4 - name: Set up Python and uv @@ -14,10 +17,8 @@ jobs: with: python-version: "3.13" - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | uv venv uv build - uv publish + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/testpypi-release.yaml b/.github/workflows/testpypi-release.yaml index 26971b5c..0ab46f35 100644 --- a/.github/workflows/testpypi-release.yaml +++ b/.github/workflows/testpypi-release.yaml @@ -57,6 +57,9 @@ jobs: test-built-dist: needs: build-artifacts runs-on: ubuntu-latest + permissions: + # IMPORTANT: this permission is mandatory for Trusted Publishing + id-token: write steps: - uses: actions/setup-python@v5 name: Install Python @@ -74,9 +77,7 @@ jobs: run: | pip install dist/flox*.whl - # - name: Publish package to TestPyPI - # uses: pypa/gh-action-pypi-publish@v1.6.4 - # with: - # password: ${{ secrets.TESTPYPI_TOKEN }} - # repository_url: https://test.pypi.org/legacy/ - # verbose: true + - name: Publish package to TestPyPI + uses: pypa/gh-action-pypi-publish@v1.6.4 + with: + repository_url: https://test.pypi.org/legacy/ From 610910b53887089a6aee940dbea4b99477ceed8d Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 07:33:15 -0600 Subject: [PATCH 02/14] try again --- .github/workflows/testpypi-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testpypi-release.yaml b/.github/workflows/testpypi-release.yaml index 0ab46f35..5dc31626 100644 --- a/.github/workflows/testpypi-release.yaml +++ b/.github/workflows/testpypi-release.yaml @@ -78,6 +78,6 @@ jobs: pip install dist/flox*.whl - name: Publish package to TestPyPI - uses: pypa/gh-action-pypi-publish@v1.6.4 + uses: pypa/gh-action-pypi-publish@v1 with: repository_url: https://test.pypi.org/legacy/ From d74810484a2d63007fd05bd0a09b69f020d599b1 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 07:38:03 -0600 Subject: [PATCH 03/14] 3 --- .github/workflows/testpypi-release.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/testpypi-release.yaml b/.github/workflows/testpypi-release.yaml index 5dc31626..76d84ebb 100644 --- a/.github/workflows/testpypi-release.yaml +++ b/.github/workflows/testpypi-release.yaml @@ -26,12 +26,6 @@ jobs: with: python-version: "3.13" - # - name: Disable local versions - # run: | - # python .github/workflows/configure-testpypi-version.py pyproject.toml - # git update-index --assume-unchanged pyproject.toml - # cat pyproject.toml - - name: Build tarball and wheels run: | git clean -xdf @@ -78,6 +72,6 @@ jobs: pip install dist/flox*.whl - name: Publish package to TestPyPI - uses: pypa/gh-action-pypi-publish@v1 + uses: pypa/gh-action-pypi-publish@release/v1 with: repository_url: https://test.pypi.org/legacy/ From 9798892c045bea6875a4d559d02e313f06fc5b0f Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 07:45:14 -0600 Subject: [PATCH 04/14] 4 --- .github/workflows/testpypi-release.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testpypi-release.yaml b/.github/workflows/testpypi-release.yaml index 76d84ebb..e3d9f841 100644 --- a/.github/workflows/testpypi-release.yaml +++ b/.github/workflows/testpypi-release.yaml @@ -74,4 +74,5 @@ jobs: - name: Publish package to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - repository_url: https://test.pypi.org/legacy/ + repository-url: https://test.pypi.org/legacy/ + password: ${{ secrets.TEST_PYPI_TOKEN }} From 1e5731851e905427c44b8f431b656244da202daf Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 07:46:56 -0600 Subject: [PATCH 05/14] 5 --- .github/workflows/testpypi-release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/testpypi-release.yaml b/.github/workflows/testpypi-release.yaml index e3d9f841..29abd56b 100644 --- a/.github/workflows/testpypi-release.yaml +++ b/.github/workflows/testpypi-release.yaml @@ -76,3 +76,4 @@ jobs: with: repository-url: https://test.pypi.org/legacy/ password: ${{ secrets.TEST_PYPI_TOKEN }} + verbose: true From 5949b568fc68e243b991fd737a936b52b09a8bc6 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 07:50:18 -0600 Subject: [PATCH 06/14] try uv --- .github/workflows/pypi.yaml | 3 ++- pyproject.toml | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 3eb20894..168efc96 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -21,4 +21,5 @@ jobs: uv venv uv build - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + run: | + uv publish --index testpypi diff --git a/pyproject.toml b/pyproject.toml index 8066582b..314692c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -313,3 +313,9 @@ types = [ "types-requests", "types-setuptools", ] + +[[tool.uv.index]] +name = "testpypi" +url = "https://test.pypi.org/simple/" +publish-url = "https://test.pypi.org/legacy/" +explicit = true From 8f643f3f92916b40c82492e9a63aeea1c4e45ff8 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 07:51:26 -0600 Subject: [PATCH 07/14] 7 --- .github/workflows/pypi.yaml | 2 +- .github/workflows/testpypi-release.yaml | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 168efc96..b13b86fb 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -22,4 +22,4 @@ jobs: uv build - name: Publish package distributions to PyPI run: | - uv publish --index testpypi + uv publish diff --git a/.github/workflows/testpypi-release.yaml b/.github/workflows/testpypi-release.yaml index 29abd56b..e10a57d2 100644 --- a/.github/workflows/testpypi-release.yaml +++ b/.github/workflows/testpypi-release.yaml @@ -55,13 +55,17 @@ jobs: # IMPORTANT: this permission is mandatory for Trusted Publishing id-token: write steps: - - uses: actions/setup-python@v5 - name: Install Python + - name: Set up Python and uv + uses: astral-sh/setup-uv@v4 + with: + python-version: "3.13" - - uses: actions/download-artifact@v4 + - name: Get built artifact + uses: actions/download-artifact@v4 with: name: releases path: dist + - name: List contents of built dist run: | ls -ltrh @@ -72,8 +76,5 @@ jobs: pip install dist/flox*.whl - name: Publish package to TestPyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ - password: ${{ secrets.TEST_PYPI_TOKEN }} - verbose: true + run: | + uv publish --index testpypi From ebfec29308ac4013f9e414fd8cdb4da20a0b1057 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 07:55:18 -0600 Subject: [PATCH 08/14] 8 --- .github/workflows/testpypi-release.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/testpypi-release.yaml b/.github/workflows/testpypi-release.yaml index e10a57d2..b700b175 100644 --- a/.github/workflows/testpypi-release.yaml +++ b/.github/workflows/testpypi-release.yaml @@ -55,6 +55,11 @@ jobs: # IMPORTANT: this permission is mandatory for Trusted Publishing id-token: write steps: + # need pyproject.toml for uv publish --index testpypi + - uses: actions/checkout@v5 + with: + fetch-depth: 0 # Fetch all history for all branches and tags. + - name: Set up Python and uv uses: astral-sh/setup-uv@v4 with: From 3492e9ae33a5d6c16b4f0cf0c270b1efad00ec5b Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 08:04:25 -0600 Subject: [PATCH 09/14] 9 --- .github/workflows/testpypi-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testpypi-release.yaml b/.github/workflows/testpypi-release.yaml index b700b175..a7edc94c 100644 --- a/.github/workflows/testpypi-release.yaml +++ b/.github/workflows/testpypi-release.yaml @@ -29,7 +29,7 @@ jobs: - name: Build tarball and wheels run: | git clean -xdf - uv build + SETUPTOOLS_SCM_LOCAL_SCHEME=no-local-version uv build - name: Check built artifacts run: | From b7123c14bf4570c1e6127fbaf810f855bef3432f Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 08:22:46 -0600 Subject: [PATCH 10/14] 10! --- .github/workflows/testpypi-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testpypi-release.yaml b/.github/workflows/testpypi-release.yaml index a7edc94c..eadd5e15 100644 --- a/.github/workflows/testpypi-release.yaml +++ b/.github/workflows/testpypi-release.yaml @@ -29,7 +29,7 @@ jobs: - name: Build tarball and wheels run: | git clean -xdf - SETUPTOOLS_SCM_LOCAL_SCHEME=no-local-version uv build + SETUPTOOLS_SCM_OVERRIDES_FOR_FLOX='{"local_scheme": "no-local-version"}' uv build - name: Check built artifacts run: | From d92fbaccd9779742ba5dfa2da92ac8c6c6fc7d0e Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 08:25:07 -0600 Subject: [PATCH 11/14] 11 --- .github/workflows/testpypi-release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testpypi-release.yaml b/.github/workflows/testpypi-release.yaml index eadd5e15..d0d8520a 100644 --- a/.github/workflows/testpypi-release.yaml +++ b/.github/workflows/testpypi-release.yaml @@ -29,7 +29,7 @@ jobs: - name: Build tarball and wheels run: | git clean -xdf - SETUPTOOLS_SCM_OVERRIDES_FOR_FLOX='{"local_scheme": "no-local-version"}' uv build + SETUPTOOLS_SCM_OVERRIDES_FOR_FLOX='local_scheme = "no-local-version"' uv build - name: Check built artifacts run: | From 583aae65f8fe884db0e199e134301fe818a82c84 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 08:26:38 -0600 Subject: [PATCH 12/14] 12 --- .github/workflows/pypi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index b13b86fb..0a580825 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -11,7 +11,7 @@ jobs: # IMPORTANT: this permission is mandatory for Trusted Publishing id-token: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python and uv uses: astral-sh/setup-uv@v4 with: From 8fed3e20b47a58ea270821270621b8e467f28f9c Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 08:32:52 -0600 Subject: [PATCH 13/14] last? --- .github/workflows/pypi.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 0a580825..ea138002 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -8,10 +8,9 @@ jobs: deploy: runs-on: ubuntu-latest permissions: - # IMPORTANT: this permission is mandatory for Trusted Publishing + contents: read id-token: write steps: - - uses: actions/checkout@v5 - name: Set up Python and uv uses: astral-sh/setup-uv@v4 with: From 49223677f2128d14564954eb7edb591dc2a4c823 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Thu, 25 Sep 2025 08:42:05 -0600 Subject: [PATCH 14/14] foo