Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write

steps:
- name: Checkout code
Expand Down Expand Up @@ -59,10 +61,42 @@ 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-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'
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: |
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 }}

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ work/
build/bdist.*
build/lib
/dist/
# Keep pypi-index for GitHub Pages serving
!/pypi-index
Loading