14
14
15
15
permissions :
16
16
actions : write
17
+ issues : write
17
18
contents : read
18
19
19
20
jobs :
22
23
runs-on : " ubuntu-20.04"
23
24
continue-on-error : ${{ matrix.config.experimental }}
24
25
env :
25
- USING_COVERAGE : ' 3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.4 ,pypy-3.6,pypy-3.7,pypy-3.8'
26
+ USING_COVERAGE : ' 3.6,3.7,3.8,3.9,3.10,3.11.0-alpha.6 ,pypy-3.6,pypy-3.7,pypy-3.8'
26
27
27
28
strategy :
28
29
fail-fast : False
33
34
- {python-version: "3.8", testenvs: "py38,build", experimental: False}
34
35
- {python-version: "3.9", testenvs: "py39,build", experimental: False}
35
36
- {python-version: "3.10", testenvs: "py310,build", experimental: False}
36
- - {python-version: "3.11.0-alpha.4 ", testenvs: "py311-dev,build", experimental: True}
37
+ - {python-version: "3.11.0-alpha.6 ", testenvs: "py311-dev,build", experimental: True}
37
38
- {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
38
39
- {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
39
40
- {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True}
@@ -139,21 +140,21 @@ jobs:
139
140
140
141
- name : Setup Python 🐍
141
142
uses : " actions/setup-python@v2"
143
+ if : startsWith(github.ref, 'refs/tags/')
142
144
with :
143
145
python-version : 3.8
144
- if : startsWith(github.ref, 'refs/tags/')
145
146
146
147
- name : Install dependencies 🔧
148
+ if : startsWith(github.ref, 'refs/tags/')
147
149
run : |
148
150
python -m pip install --upgrade pip setuptools wheel
149
151
python -m pip install --upgrade tox
150
- if : startsWith(github.ref, 'refs/tags/')
151
152
152
153
- name : Build distributions 📦
154
+ if : startsWith(github.ref, 'refs/tags/')
153
155
run : |
154
156
tox -e build
155
157
156
- if : startsWith(github.ref, 'refs/tags/')
157
158
158
159
- name : Upload distribution to PyPI 🚀
159
160
if : startsWith(github.ref, 'refs/tags/')
@@ -163,6 +164,15 @@ jobs:
163
164
password : ${{ secrets.PYPI_TOKEN }}
164
165
skip_existing : true
165
166
167
+ - name : Close milestone 🚪
168
+ if : startsWith(github.ref, 'refs/tags/')
169
+ run : |
170
+ python -m pip install --upgrade github3.py packaging
171
+ python .github/milestones.py
172
+ env :
173
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
174
+
175
+
166
176
167
177
Conda :
168
178
needs : deploy
@@ -177,22 +187,46 @@ jobs:
177
187
with :
178
188
python-version : 3.8
179
189
190
+ - name : Setup Conda
191
+ uses : conda-incubator/setup-miniconda@v2
192
+ with :
193
+ activate-environment : env
194
+ conda-build-version : 3.21.0
195
+
180
196
- name : Install dependencies 🔧
181
197
run : |
198
+ python -VV
199
+ python -m site
182
200
python -m pip install --upgrade pip setuptools wheel
183
201
python -m pip install --upgrade "mkrecipe" "whey"
202
+ # $CONDA is an environment variable pointing to the root of the miniconda directory
203
+ $CONDA/bin/conda config --set always_yes yes --set changeps1 no
204
+ $CONDA/bin/conda update -n base conda
205
+ $CONDA/bin/conda info -a
206
+ $CONDA/bin/conda config --add channels conda-forge
207
+ $CONDA/bin/conda config --add channels domdfcoding
184
208
185
- wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh -O miniconda.sh
186
- bash miniconda.sh -b -p $HOME/miniconda
209
+ $CONDA/bin/conda config --remove channels defaults
187
210
188
- - name : Build Conda 📦
211
+ - name : Build Conda Package 📦
189
212
run : |
190
- chmod +x .github/actions_build_conda.sh
191
- bash .github/actions_build_conda.sh
213
+ python -m mkrecipe --type wheel || exit 1
214
+ $CONDA/bin/conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist
192
215
193
- - name : Deploy Conda 🚀
216
+ - name : Deploy Conda Package 🚀
217
+ if : startsWith(github.ref, 'refs/tags/')
194
218
run : |
195
- chmod +x .github/actions_deploy_conda.sh
196
- bash .github/actions_deploy_conda.sh
219
+ $CONDA/bin/conda config --set always_yes yes --set changeps1 no
220
+ $CONDA/bin/conda install anaconda-client
221
+ $CONDA/bin/conda info -a
222
+
223
+ for f in conda/dist/noarch/seed_intersphinx_mapping-*.tar.bz2; do
224
+ [ -e "$f" ] || continue
225
+ echo "$f"
226
+ conda install "$f" || exit 1
227
+ echo "Deploying to Anaconda.org..."
228
+ $CONDA/bin/anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1
229
+ echo "Successfully deployed to Anaconda.org."
230
+ done
197
231
env :
198
232
ANACONDA_TOKEN : ${{ secrets.ANACONDA_TOKEN }}
0 commit comments