Skip to content

Commit

Permalink
Merge pull request #12905 from rtibbles/test_pypi_cleanup
Browse files Browse the repository at this point in the history
Create github action for automatically cleaning up test pypi.
  • Loading branch information
rtibbles authored Dec 4, 2024
2 parents d4a7d71 + 41f1f8a commit 4ae3fc7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/cleanup_test_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Cleanup TestPyPi

on:
workflow_call:
secrets:
TESTPYPI_API_TOKEN:
required: true
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pypi-cleanup
- name: Cleanup TestPyPi
env:
PYPI_CLEANUP_PASSWORD: ${{ secrets.TESTPYPI_API_TOKEN }}
run: pypi-cleanup --host https://test.pypi.org --package kolibri --leave-most-recent-only --username __token__
8 changes: 7 additions & 1 deletion .github/workflows/release_kolibri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,15 @@ jobs:
with:
filename: ${{ needs.apk.outputs.apk-file-name }}
release_id: ${{ github.event.release.id }}
test_pypi_cleanup:
name: Cleanup TestPyPi
needs: whl
uses: ./.github/workflows/cleanup_test_pypi.yml
secrets:
TESTPYPI_API_TOKEN: ${{ secrets.TESTPYPI_API_TOKEN }}
test_pypi_upload:
name: Upload to TestPyPi
needs: whl
needs: [whl, test_pypi_cleanup]
uses: ./.github/workflows/pypi_upload.yml
with:
whl-file-name: ${{ needs.whl.outputs.whl-file-name }}
Expand Down

0 comments on commit 4ae3fc7

Please sign in to comment.