1- name : LEEP release
1+ name : LEEP
22
3- on :
4- workflow_run :
5- workflows : [LEEP tests]
6- types : [completed]
3+ on : [push, pull_request, workflow_dispatch]
74
85jobs :
9- build :
6+ test :
107
118 name : ${{ matrix.name }}
129 runs-on : ${{ matrix.os }}
13- if : ${{ github.event.workflow_run.conclusion == 'success' }}
14- # && startsWith(github.ref, 'refs/tags/v')
10+
11+ strategy :
12+ fail-fast : false
13+ matrix :
14+ include :
15+ - name : Ubuntu latest with py3.x
16+ os : ubuntu-latest
17+ python : " 3.x"
18+
19+ steps :
20+ - uses : actions/checkout@v6
21+
22+ - name : Setup python
23+ uses : actions/setup-python@v6
24+ with :
25+ python-version : ${{ matrix.python }}
26+
27+ - name : Install basic Python packages
28+ run : |
29+ python -m pip install --upgrade pip
30+ python -m pip install -r requirements.txt
31+ python -m pip install pytest flake8
32+ which python
33+ python --version
34+ python -m pip --version
35+ python -m pytest --version
36+ python -m flake8 --version
37+
38+ - name : Lint
39+ run : |
40+ flake8
41+ continue-on-error : true
42+
43+ - name : Test
44+ run : |
45+ python -m pytest -v
46+
47+ release :
48+
49+ name : ${{ matrix.name }}
50+ runs-on : ${{ matrix.os }}
51+ needs : test
52+ if : ${{ startsWith(github.ref, 'refs/tags/v') }}
1553
1654 strategy :
1755 fail-fast : false
@@ -35,12 +73,15 @@ jobs:
3573 python -m pip install \
3674 "setuptools>=64" \
3775 "setuptools-scm>=8" \
76+ build \
3877 wheel \
3978 twine
4079 which python
4180 python --version
4281 python -m pip --version
43- python -m twine -h
82+ python -m build --version
83+ python -m wheel version
84+ python -m twine --version
4485
4586 - name : Build
4687 run : |
@@ -64,10 +105,10 @@ jobs:
64105 run : |
65106 python -m twine check dist/leep*.tar.*
66107
67- # - name: Upload package
68- # env:
69- # PYPI_REPOSITORY: pypi
70- # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
71- # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
72- # run: |
73- # python -m twine upload --repository ${PYPI_REPOSITORY} dist/*
108+ - name : Upload package
109+ env :
110+ PYPI_REPOSITORY : pypi
111+ TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
112+ TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
113+ run : |
114+ python -m twine upload --repository ${{ env. PYPI_REPOSITORY } } dist/*
0 commit comments