File: cleanup-python.yml

package info (click to toggle)
libnvme 1.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,016 kB
  • sloc: ansic: 35,812; perl: 1,834; sh: 475; python: 194; cpp: 64; makefile: 55
file content (35 lines) | stat: -rw-r--r-- 1,017 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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")