1414
1515permissions :
1616 actions : write
17+ issues : write
1718 contents : read
1819
1920jobs :
2223 runs-on : " ubuntu-20.04"
2324 continue-on-error : ${{ matrix.config.experimental }}
2425 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'
2627
2728 strategy :
2829 fail-fast : False
3334 - {python-version: "3.8", testenvs: "py38,build", experimental: False}
3435 - {python-version: "3.9", testenvs: "py39,build", experimental: False}
3536 - {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}
3738 - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False}
3839 - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: True}
3940 - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: True}
@@ -139,21 +140,21 @@ jobs:
139140
140141 - name : Setup Python 🐍
141142 uses : " actions/setup-python@v2"
143+ if : startsWith(github.ref, 'refs/tags/')
142144 with :
143145 python-version : 3.8
144- if : startsWith(github.ref, 'refs/tags/')
145146
146147 - name : Install dependencies 🔧
148+ if : startsWith(github.ref, 'refs/tags/')
147149 run : |
148150 python -m pip install --upgrade pip setuptools wheel
149151 python -m pip install --upgrade tox
150- if : startsWith(github.ref, 'refs/tags/')
151152
152153 - name : Build distributions 📦
154+ if : startsWith(github.ref, 'refs/tags/')
153155 run : |
154156 tox -e build
155157
156- if : startsWith(github.ref, 'refs/tags/')
157158
158159 - name : Upload distribution to PyPI 🚀
159160 if : startsWith(github.ref, 'refs/tags/')
@@ -163,6 +164,15 @@ jobs:
163164 password : ${{ secrets.PYPI_TOKEN }}
164165 skip_existing : true
165166
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+
166176
167177 Conda :
168178 needs : deploy
@@ -177,22 +187,46 @@ jobs:
177187 with :
178188 python-version : 3.8
179189
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+
180196 - name : Install dependencies 🔧
181197 run : |
198+ python -VV
199+ python -m site
182200 python -m pip install --upgrade pip setuptools wheel
183201 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
184208
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
187210
188- - name : Build Conda 📦
211+ - name : Build Conda Package 📦
189212 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
192215
193- - name : Deploy Conda 🚀
216+ - name : Deploy Conda Package 🚀
217+ if : startsWith(github.ref, 'refs/tags/')
194218 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
197231 env :
198232 ANACONDA_TOKEN : ${{ secrets.ANACONDA_TOKEN }}
0 commit comments