|
23 | 23 | -
|
24 | 24 | name: Checkout
|
25 | 25 | uses: actions/checkout@v1
|
26 |
| - - |
| 26 | + - |
27 | 27 | name: Set Python
|
28 | 28 | uses: actions/setup-python@v2
|
29 | 29 | with:
|
@@ -75,17 +75,17 @@ jobs:
|
75 | 75 | name: Checkout
|
76 | 76 | uses: actions/checkout@v1
|
77 | 77 | -
|
78 |
| - name: Download GEOS artifacts |
79 |
| - uses: actions/download-artifact@v1 |
80 |
| - with: |
81 |
| - name: artifacts-geos-${{ matrix.arch }} |
82 |
| - path: ${{ env.PKGDIR }}/extern |
83 |
| - - |
84 | 78 | name: Set Python
|
85 | 79 | uses: actions/setup-python@v2
|
86 | 80 | with:
|
87 | 81 | python-version: "${{ matrix.python-version }}"
|
88 | 82 | architecture: ${{ matrix.arch }}
|
| 83 | + - |
| 84 | + name: Download GEOS artifacts |
| 85 | + uses: actions/download-artifact@v1 |
| 86 | + with: |
| 87 | + name: artifacts-geos-${{ matrix.arch }} |
| 88 | + path: ${{ env.PKGDIR }}/extern |
89 | 89 | -
|
90 | 90 | name: Define MSVC toolchain version
|
91 | 91 | run: |
|
@@ -141,3 +141,58 @@ jobs:
|
141 | 141 | with:
|
142 | 142 | name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
|
143 | 143 | path: ${{ env.PKGDIR }}/dist
|
| 144 | + |
| 145 | + upload: |
| 146 | + strategy: |
| 147 | + matrix: |
| 148 | + arch: |
| 149 | + [ |
| 150 | + "x64", |
| 151 | + "x86", |
| 152 | + ] |
| 153 | + python-version: |
| 154 | + [ |
| 155 | + "3.5", |
| 156 | + "3.6", |
| 157 | + "3.7", |
| 158 | + "3.8", |
| 159 | + "3.9", |
| 160 | + ] |
| 161 | + max-parallel: 1 |
| 162 | + if: startsWith(github.event.ref, 'refs/tags/v') |
| 163 | + needs: build |
| 164 | + runs-on: windows-latest |
| 165 | + environment: PyPI |
| 166 | + steps: |
| 167 | + - |
| 168 | + name: Checkout |
| 169 | + uses: actions/checkout@v1 |
| 170 | + - |
| 171 | + name: Set Python |
| 172 | + uses: actions/setup-python@v2 |
| 173 | + with: |
| 174 | + python-version: "${{ matrix.python-version }}" |
| 175 | + architecture: ${{ matrix.arch }} |
| 176 | + - |
| 177 | + name: Download build artifacts |
| 178 | + uses: actions/download-artifact@v1 |
| 179 | + with: |
| 180 | + name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }} |
| 181 | + path: ${{ env.PKGDIR }}/dist |
| 182 | + - |
| 183 | + name: Install requirements |
| 184 | + run: | |
| 185 | + pip install --prefer-binary twine |
| 186 | + - |
| 187 | + name: Upload distributables |
| 188 | + env: |
| 189 | + TWINE_USERNAME: __token__ |
| 190 | + TWINE_PASSWORD: "${{ secrets.PYPI_TOKEN }}" |
| 191 | + TWINE_REPOSITORY_URL: "${{ secrets.PYPI_REPOSITORY_URL }}" |
| 192 | + run: | |
| 193 | + python -m twine check \ |
| 194 | + ${{ env.PKGDIR }}/dist/*.zip \ |
| 195 | + ${{ env.PKGDIR }}/dist/*-win*.whl |
| 196 | + python -m twine upload --skip-existing \ |
| 197 | + ${{ env.PKGDIR }}/dist/*.zip \ |
| 198 | + ${{ env.PKGDIR }}/dist/*-win*.whl |
0 commit comments