Skip to content

Commit 3b7ad4d

Browse files
committed
Add upload job for basemap-for-windows workflow
1 parent 292cf11 commit 3b7ad4d

File tree

1 file changed

+62
-7
lines changed

1 file changed

+62
-7
lines changed

.github/workflows/basemap-for-windows.yml

Lines changed: 62 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
-
2424
name: Checkout
2525
uses: actions/checkout@v1
26-
-
26+
-
2727
name: Set Python
2828
uses: actions/setup-python@v2
2929
with:
@@ -75,17 +75,17 @@ jobs:
7575
name: Checkout
7676
uses: actions/checkout@v1
7777
-
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-
-
8478
name: Set Python
8579
uses: actions/setup-python@v2
8680
with:
8781
python-version: "${{ matrix.python-version }}"
8882
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
8989
-
9090
name: Define MSVC toolchain version
9191
run: |
@@ -141,3 +141,58 @@ jobs:
141141
with:
142142
name: artifacts-build-${{ matrix.arch }}-${{ matrix.python-version }}
143143
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

Comments
 (0)