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 99 pull_request :
1010 branches :
1111 - " *"
12+ release :
13+ types :
14+ - published
1215 schedule :
1316 # Daily at 05:47
1417 - cron : ' 47 5 * * *'
2124 PIP_NO_PYTHON_VERSION_WARNING : 1
2225
2326jobs :
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+
2446 test :
2547 name : ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.reactor.name }}
2648 runs-on : ${{ matrix.os.runs-on }}
@@ -215,9 +237,13 @@ jobs:
215237 - name : Install
216238 run : |
217239 pip install tox
240+ - uses : actions/download-artifact@v4
241+ with :
242+ name : dist
243+ path : dist/
218244 - name : Test
219245 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"
221247 linting :
222248 name : Linting
223249 runs-on : ubuntu-latest
@@ -239,12 +265,31 @@ jobs:
239265 - name : Test
240266 run : |
241267 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
242285 all :
243286 name : All
244287 runs-on : ubuntu-latest
245288 needs :
289+ - build
246290 - test
247291 - linting
292+ - publish
248293 steps :
249294 - name : This
250295 shell : python
You can’t perform that action at this time.
0 commit comments