-
Notifications
You must be signed in to change notification settings - Fork 9
49 lines (49 loc) · 1.23 KB
/
pypi-cleanup.yml
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
45
46
47
48
49
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