From 99175f2d7af484549130c4baa6eb4430aa5b0f6b Mon Sep 17 00:00:00 2001 From: Augustus Ostow Date: Tue, 15 Jul 2025 14:39:44 -0400 Subject: [PATCH 1/3] Remove unused var --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c82951a..76bd101 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,7 +62,6 @@ jobs: - name: Push bumped version if: steps.bump.outputs.bumped == 'true' run: | - target_ref=${{ github.head_ref && format('refs/heads/{0}', github.head_ref) || github.ref }} git push origin HEAD:${{ github.ref }} git push origin ${{ steps.bump.outputs.git-tag }} From 1cdf1af9e61a478bd943b9518530468ad234e958 Mon Sep 17 00:00:00 2001 From: Augustus Ostow Date: Tue, 15 Jul 2025 14:41:13 -0400 Subject: [PATCH 2/3] Publish wheels to Github Pages --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ 2 files changed, 37 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 76bd101..1076f59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,8 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + pages: write + id-token: write steps: - name: Checkout code @@ -59,6 +61,39 @@ jobs: env: GH_TOKEN: ${{ github.token }} + - name: Create pypi-index directory + if: steps.bump.outputs.bumped == 'true' + run: | + mkdir -p pypi-index + cp target/wheels/*.whl pypi-index/ + + - name: Generate PyPI index with dumb-pypi + if: steps.bump.outputs.bumped == 'true' + run: | + uvx dumb-pypi --package-dir pypi-index --output-dir pypi-index + + - name: Setup Pages + if: steps.bump.outputs.bumped == 'true' + uses: actions/configure-pages@v5 + + - name: Upload Pages artifact + if: steps.bump.outputs.bumped == 'true' + uses: actions/upload-pages-artifact@v3 + with: + path: pypi-index + + - name: Deploy to Github Pages + if: steps.bump.outputs.bumped == 'true' + id: deployment + uses: actions/deploy-pages@v4 + + - name: Commit pypi-index to repository + if: steps.bump.outputs.bumped == 'true' + run: | + git add pypi-index + git commit -m "Add PyPI index for ${{ steps.bump.outputs.git-tag }}" + git push origin HEAD:${{ github.ref }} + - name: Push bumped version if: steps.bump.outputs.bumped == 'true' run: | diff --git a/.gitignore b/.gitignore index 56124a8..b1176a7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ work/ build/bdist.* build/lib /dist/ +# Keep pypi-index for GitHub Pages serving +!/pypi-index From 3b77a45429db90bdfab918581df830fcef96a0ef Mon Sep 17 00:00:00 2001 From: Augustus Ostow Date: Tue, 15 Jul 2025 14:51:44 -0400 Subject: [PATCH 3/3] Fix dumb-pypi invocation --- .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 1076f59..2ab1faf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,7 +70,7 @@ jobs: - name: Generate PyPI index with dumb-pypi if: steps.bump.outputs.bumped == 'true' run: | - uvx dumb-pypi --package-dir pypi-index --output-dir pypi-index + uvx dumb-pypi --package-list <(cd ./pypi-index && ls *.whl) --output-dir pypi-index --packages-url https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/ - name: Setup Pages if: steps.bump.outputs.bumped == 'true'