Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create github action for automatically cleaning up test pypi. #12905

Merged
merged 1 commit into from
Dec 4, 2024
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
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
Loading