-
Notifications
You must be signed in to change notification settings - Fork 1
121 lines (113 loc) · 2.68 KB
/
python.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Python
on:
push:
branches: ["develop"]
tags: ["*"]
pull_request:
branches: ["develop"]
jobs:
test:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
# Generated with scripts/github_actions_get_python_versions.py
python-version: [
# NOTE: We do not check 3.8.0 because Flake8 does not run on it.
"3.8.1",
"3.8.2",
"3.8.3",
"3.8.4",
"3.8.5",
"3.8.6",
"3.8.7",
"3.8.8",
"3.8.9",
"3.8.10",
"3.8.11",
"3.8.12",
"3.8.13",
"3.8.14",
"3.8.15",
"3.8.16",
"3.8.17",
"3.8.18",
"3.9.0",
"3.9.1",
"3.9.2",
"3.9.3",
"3.9.4",
"3.9.5",
"3.9.6",
"3.9.7",
"3.9.8",
"3.9.9",
"3.9.10",
"3.9.11",
"3.9.12",
"3.9.13",
"3.9.14",
"3.9.15",
"3.9.16",
"3.9.17",
"3.9.18",
"3.10.0",
"3.10.1",
"3.10.2",
"3.10.3",
"3.10.4",
"3.10.5",
"3.10.6",
"3.10.7",
"3.10.8",
"3.10.9",
"3.10.10",
"3.10.11",
"3.10.12",
"3.10.13",
"3.11.0",
"3.11.1",
"3.11.2",
"3.11.3",
"3.11.4",
"3.11.5",
"3.11.6",
"3.11.7",
"3.11.8",
"3.12.0",
"3.12.1",
"3.12.2",
"3.x",
"pypy-3.8", # "pypy-3.9", "pypy-3.10"
]
steps:
- uses: actions/checkout@v4
- uses: NiklasRosenstein/slap@gha/install/v1
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: "0.5.25"
- uses: actions/setup-python@v5
with: { python-version: "${{ matrix.python-version }}" }
- run: slap test
publish:
runs-on: ubuntu-latest
needs: test
environment: release
permissions:
id-token: write
if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push'
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install uv
run: python -m pip install uv
- name: Build dist
run: uv build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/