-
Notifications
You must be signed in to change notification settings - Fork 2
87 lines (86 loc) · 2.17 KB
/
template.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: wheel-axle-template
on:
workflow_call:
inputs:
os:
required: true
type: string
python-version:
required: true
type: string
deploy:
required: false
type: boolean
default: false
deploy-pip:
required: false
type: string
default: none
deploy-setuptools:
required: false
type: string
exclude:
required: false
type: string
secrets:
PYPI_TOKEN:
required: false
jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: false
matrix:
os:
- ${{ inputs.os }}
python-version:
- ${{ inputs.python-version }}
pip-version:
- '24.2'
- '24.1'
- '24.0'
- '23.3'
- '22.3'
setuptools-version:
- '75.1'
- '74.1'
- '73.0'
- '72.2'
- '71.1'
- '70.3'
- '69.5'
- '68.2'
- '67.8'
- '66.1'
- '65.7'
- '64.0'
- '63.4'
- '62.6'
exclude: ${{ fromJSON(inputs.exclude) }}
env:
DEPLOY_PIP: ${{ inputs.deploy-pip }}
DEPLOY_SETUPTOOLS: ${{ inputs.deploy-setuptools }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- shell: bash
run: |
echo "PYB_EXTRA_ARGS=--no-venvs" >> $GITHUB_ENV
echo "SETUPTOOLS_VER=~=${{matrix.setuptools-version}}" >> $GITHUB_ENV
echo "PIP_VER=~=${{matrix.pip-version}}" >> $GITHUB_ENV
- shell: bash
if: |
inputs.deploy &&
contains(env.DEPLOY_PIP, matrix.pip-version) &&
contains(env.DEPLOY_SETUPTOOLS, matrix.setuptools-version)
run: |
echo "PYB_EXTRA_ARGS=+upload --no-venvs" >> $GITHUB_ENV
- uses: pybuilder/build@master
with:
checkout: false
with-venv: false
python-version: ${{ matrix.python-version }}
pyb-extra-args: ${{ env.PYB_EXTRA_ARGS }}