Add ability to delete all versions except the most recent one #41
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pypi-cleanup | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
build-stable: | |
runs-on: ${{ matrix.os }} | |
continue-on-error: false | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
python-version: | |
- '3.12' | |
- '3.11' | |
- '3.10' | |
- '3.9' | |
- '3.8' | |
- '3.7' | |
env: | |
DEPLOY_PYTHONS: "3.12" | |
DEPLOY_OSES: "Linux" | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- shell: bash | |
if: | | |
github.event_name == 'push' && | |
contains(env.DEPLOY_OSES, runner.os) && | |
contains(env.DEPLOY_PYTHONS, matrix.python-version) | |
run: | | |
echo "PYB_EXTRA_ARGS=+upload" >> $GITHUB_ENV | |
- uses: pybuilder/build@master | |
with: | |
python-version: ${{ matrix.python-version }} | |
pyb-extra-args: ${{ env.PYB_EXTRA_ARGS }} | |
build-stable-summary: | |
if: success() || failure() | |
runs-on: ubuntu-latest | |
name: Build Stable Summary | |
needs: build-stable | |
steps: | |
- name: Check build matrix status | |
if: needs.build-stable.result != 'success' | |
run: exit 1 |