1
0
Fork 0
libnvme/.github/workflows/cleanup-python.yml
Daniel Baumann 9ae445a706
Adding upstream version 1.14.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-05-22 12:57:21 +02:00

35 lines
1,017 B
YAML

name: cleanup python
on:
workflow_dispatch:
inputs:
keep-last:
description: "How many recent dev releases to keep"
required: false
default: "5"
dry-run:
description: "Only simulate the deletion (true/false)"
required: false
default: "true"
jobs:
cleanup:
runs-on: ubuntu-latest
environment: pypi
steps:
- name: Install pypi-cleanup
run: pip install pypi-cleanup
- name: Run pypi-cleanup on TestPyPI
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
pypi-cleanup \
--username "$PYPI_USERNAME" \
--password "$PYPI_PASSWORD" \
--repository-url https://test.pypi.org/legacy/ \
--package libnvme \
--keep ${{ github.event.inputs.keep-last }} \
--version-regex '.*\.dev[0-9]+' \
$([ "${{ github.event.inputs.dry-run }}" == "true" ] && echo "--dry-run")