99jobs :
1010 # Build job
1111 build :
12- runs-on : ${{matrix.os[0]}}
13- strategy :
14- matrix :
15- os :
16- - [ubuntu-latest, manylinux_x86_64]
17- - [macos-12, macosx_x86_64]
18- - [windows-2019, win_amd64]
19- python : ["cp38", "cp39", "cp310"]
20-
12+ runs-on : ubuntu-latest
2113 steps :
22- - name : Change file endings.
23- run : |
24- git config --global core.autocrlf false
25- git config --global core.eol lf
26-
2714 - name : Checkout code
2815 uses : actions/checkout@v2
2916
@@ -35,56 +22,13 @@ jobs:
3522 - name : Install dependencies
3623 run : |
3724 python -m pip install --upgrade pip
38- pip install build cibuildwheel==2.13.1
39-
40- - name : Build wheels
41- run : |
42- python -m cibuildwheel --output-dir dist
43- env :
44- CIBW_BUILD : ${{ matrix.python }}-${{ matrix.os[1] }}
4525
46- - name : Build sdist and universal wheel
47- if : ${{matrix.python == 'cp38' && matrix.os[0] == 'ubuntu-latest'}}
26+ - name : Build
4827 run : |
49- python setup-universal.py
5028 python -m build
5129
52- - name : Cache dist
53- uses : actions/cache@v3
30+ - name : Publish package
31+ uses : pypa/gh-action-pypi-publish@f5622bde02b04381239da3573277701ceca8f6a0
5432 with :
55- path : dist/
56- key : ${{matrix.python}}-${{matrix.os[0]}}-${{hashFiles('**/daf/__init__.py')}}
57- enableCrossOsArchive : true
58-
59- # Publish job
60- publish :
61- runs-on : ubuntu-latest
62- needs : build
63- strategy :
64- matrix : # Same as in build job
65- os :
66- - [ubuntu-latest, manylinux_x86_64]
67- - [macos-12, macosx_x86_64]
68- - [windows-2019, win_amd64]
69- python : ["cp38", "cp39", "cp310"]
70- steps :
71- - name : Change file endings.
72- run : |
73- git config --global core.autocrlf false
74- git config --global core.eol lf
75-
76- - name : Checkout code
77- uses : actions/checkout@v2
78-
79- - name : Restore dist
80- uses : actions/cache/restore@v3
81- with :
82- path : dist/
83- key : ${{matrix.python}}-${{matrix.os[0]}}-${{hashFiles('**/daf/__init__.py')}}
84- enableCrossOsArchive : true
85-
86- - name : Publish package
87- uses : pypa/gh-action-pypi-publish@f5622bde02b04381239da3573277701ceca8f6a0
88- with :
89- user : __token__
90- password : ${{ secrets.PYPI_API_TOKEN }}
33+ user : __token__
34+ password : ${{ secrets.PYPI_API_TOKEN }}
0 commit comments