@@ -10,11 +10,12 @@ name: Python Build
1010
1111jobs :
1212 development-mode :
13+ name : pip development mode on ${{ matrix.os }}
1314 runs-on : ${{ matrix.os }}
1415 strategy :
1516 fail-fast : false
1617 matrix :
17- os : [ubuntu-latest, macos-latest]
18+ os : [macos-latest]
1819 python-version : [3.8]
1920
2021 steps :
3637 run : pytest tests/test_pyssht.py
3738
3839 from-sdist :
39- name : Build source distribution
40+ name : python source distribution
4041 runs-on : ubuntu-latest
4142 steps :
4243 - uses : actions/checkout@v2
6061 run : pytest tests/test_pyssht.py
6162
6263 - uses : actions/upload-artifact@v2
63- if : github.ref_type == 'tag'
64+ if : ${{ startsWith( github.ref, 'refs/tags') }}
6465 with :
6566 path : ./dist/*.tar.gz
6667 name : source-distribution
@@ -98,13 +99,14 @@ jobs:
9899 run : pytest tests
99100
100101 - uses : actions/upload-artifact@v2
101- if : github.ref_type == 'tag'
102+ if : ${{ startsWith( github.ref, 'refs/tags') }}
102103 with :
103104 path : ./dist/*.whl
104105 name : wheel-${{matrix.os}}-${{matrix.python-version}}
105106
106107 publication :
107- if : github.ref_type == 'tag'
108+ name : publish to pypi
109+ if : ${{ startsWith(github.ref, 'refs/tags') }}
108110 runs-on : ubuntu-latest
109111 needs : [build_wheels, from-sdist]
110112 steps :
@@ -117,14 +119,14 @@ jobs:
117119 mv source-distribution/*.tar.gz wheel-*/*.whl dist
118120
119121 - name : Publish distribution 📦 to Test PyPI
120- if : github.ref != 'refs/tags/v1.3.2'
122+ if : ${{ github.ref != 'refs/tags/v1.3.2' }}
121123 uses : pypa/gh-action-pypi-publish@master
122124 with :
123125 password : ${{ secrets.TEST_PYPI_TOKEN }}
124126 repository_url : https://test.pypi.org/legacy/
125127
126128 - name : Publish distribution 📦 to PyPI
127- if : github.ref == 'refs/tags/v1.3.2'
129+ if : ${{ github.ref == 'refs/tags/v1.3.2' }}
128130 uses : pypa/gh-action-pypi-publish@master
129131 with :
130132 password : ${{ secrets.PYPI_TOKEN }}
0 commit comments