File tree Expand file tree Collapse file tree 1 file changed +46
-1
lines changed Expand file tree Collapse file tree 1 file changed +46
-1
lines changed Original file line number Diff line number Diff line change 9
9
pull_request :
10
10
branches :
11
11
- " *"
12
+ release :
13
+ types :
14
+ - published
12
15
schedule :
13
16
# Daily at 05:47
14
17
- cron : ' 47 5 * * *'
21
24
PIP_NO_PYTHON_VERSION_WARNING : 1
22
25
23
26
jobs :
27
+ build :
28
+ name : Build
29
+ runs-on : ubuntu-latest
30
+ container : docker://python:3.11-buster
31
+ steps :
32
+ - uses : actions/checkout@v2
33
+ - name : Build
34
+ run : |
35
+ python -m venv venv
36
+ venv/bin/pip install --uprade pip
37
+ venv/bin/pip install build
38
+ python -m build --outdir/ dist
39
+ - uses : actions/upload-artifact@v4
40
+ if : always()
41
+ with :
42
+ name : dist
43
+ path : dist/*
44
+ if-no-files-found : error
45
+
24
46
test :
25
47
name : ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.reactor.name }}
26
48
runs-on : ${{ matrix.os.runs-on }}
@@ -215,9 +237,13 @@ jobs:
215
237
- name : Install
216
238
run : |
217
239
pip install tox
240
+ - uses : actions/download-artifact@v4
241
+ with :
242
+ name : dist
243
+ path : dist/
218
244
- name : Test
219
245
run : |
220
- tox -v -e "${{ matrix.python.tox }}-${{ matrix.reactor.tox }}reactor"
246
+ tox --installpkg dist/*.whl - v -e "${{ matrix.python.tox }}-${{ matrix.reactor.tox }}reactor"
221
247
linting :
222
248
name : Linting
223
249
runs-on : ubuntu-latest
@@ -239,12 +265,31 @@ jobs:
239
265
- name : Test
240
266
run : |
241
267
tox -v -e linting
268
+ publish :
269
+ name : Publish
270
+ runs-on : ubuntu-latest
271
+ needs :
272
+ - build
273
+ - test
274
+ - linting
275
+ steps :
276
+ - uses : actions/download-artifact@v4
277
+ with :
278
+ name : dist
279
+ path : dist/
280
+ - uses : pypa/gh-action-pypi-publish@release/v1
281
+ if : github.event_name == 'release'
282
+ with :
283
+ packages-dir : dist/
284
+ skip-existing : true
242
285
all :
243
286
name : All
244
287
runs-on : ubuntu-latest
245
288
needs :
289
+ - build
246
290
- test
247
291
- linting
292
+ - publish
248
293
steps :
249
294
- name : This
250
295
shell : python
You can’t perform that action at this time.
0 commit comments