-
Notifications
You must be signed in to change notification settings - Fork 710
44 lines (39 loc) · 1.17 KB
/
libnvme-cleanup-python.yml
File metadata and controls
44 lines (39 loc) · 1.17 KB
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
36
37
38
39
40
41
42
43
44
---
# SPDX-License-Identifier: GPL-2.0-or-later
#
# This file is part of nvme.
# Copyright (c) 2026 SUSE LLC
#
# Authors: Daniel Wagner <dwagner@suse.de>
name: Cleanup Python dev releases
on:
workflow_dispatch:
inputs:
keep-last:
description: "Number of recent dev releases to keep"
required: false
default: "5"
dry-run:
description: "Only simulate deletions (true/false)"
required: false
default: "true"
jobs:
cleanup:
runs-on: ubuntu-latest
environment: pypi
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install pypi-cleanup
run: pip install pypi-cleanup
- name: Run pypi-cleanup on TestPyPI
env:
PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
run: |
cd libnvme
pypi-cleanup \
--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")