Skip to content

Commit 168f2a2

Browse files
authored
CI: Fix wheel builder uploading (#27)
* CI: Fix wheel builder uploading * Maybe fix? * Update wheels.yml * Update wheels.yml * restrict upload conditions * Update wheels.yml * Update wheels.yml
1 parent 081c06b commit 168f2a2

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

.github/workflows/wheels.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,21 @@ jobs:
7171
uses: pypa/[email protected]
7272
env:
7373
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
74-
75-
# Used to test the built wheels
76-
- uses: actions/setup-python@v4
74+
75+
# Used to test(Windows-only) and push the built wheels
76+
# You might need to use setup-python separately
77+
# if the new Python-dev version
78+
# is unavailable on conda-forge.
79+
- uses: conda-incubator/setup-miniconda@v2
7780
with:
81+
auto-update-conda: true
82+
# Really doesn't matter what version we upload with
83+
# just the version we test with
7884
python-version: ${{ matrix.python[1] }}
85+
activate-environment: test
86+
channels: conda-forge, anaconda
87+
channel-priority: true
88+
mamba-version: "*"
7989

8090
- name: Test wheels (Windows 64-bit only)
8191
if: ${{ matrix.buildplat[1] == 'win_amd64' }}
@@ -88,26 +98,15 @@ jobs:
8898
name: ${{ matrix.python[0] }}-${{ startsWith(matrix.buildplat[1], 'macosx') && 'macosx' || matrix.buildplat[1] }}
8999
path: ./wheelhouse/*.whl
90100

91-
# Used to push the built wheels
92-
# TODO: once Python 3.11 is available on conda, de-dup with
93-
# setup python above
94-
- uses: conda-incubator/setup-miniconda@v2
95-
with:
96-
auto-update-conda: true
97-
# Really doesn't matter what version we upload with
98-
# just the version we test with
99-
python-version: '3.8'
100-
channels: conda-forge
101-
channel-priority: true
102-
mamba-version: "*"
103101

104102
- name: Install anaconda client
105103
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
104+
shell: bash -el {0}
106105
run: conda install -q -y anaconda-client
107106

108107

109108
- name: Upload wheels
110-
if: success()
109+
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
111110
shell: bash -el {0}
112111
env:
113112
PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}
@@ -180,11 +179,12 @@ jobs:
180179

181180
- name: Install anaconda client
182181
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
182+
shell: bash -el {0}
183183
run: |
184184
conda install -q -y anaconda-client
185185
186186
- name: Upload sdist
187-
if: success()
187+
if: ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
188188
shell: bash -el {0}
189189
env:
190190
PANDAS_STAGING_UPLOAD_TOKEN: ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}

0 commit comments

Comments
 (0)