@@ -173,93 +173,3 @@ jobs:
173173 - name : Run tox -e ${{ matrix.tox_env }}
174174 run : |
175175 tox -e ${{ matrix.tox_env }}
176- publish :
177- name : Publish to PyPI registry
178- needs :
179- - linters
180- - unit
181- runs-on : ubuntu-latest
182-
183- env :
184- PY_COLORS : 1
185- TOXENV : packaging
186- TOX_PARALLEL_NO_SPINNER : 1
187-
188- steps :
189- - name : Switch to using Python 3.8 by default
190- uses : actions/setup-python@v2
191- with :
192- python-version : 3.8
193- - name : Install tox
194- run : >-
195- python -m
196- pip install
197- --user
198- tox
199- - name : Check out src from Git
200- uses : actions/checkout@v2
201- with :
202- # Get shallow Git history (default) for tag creation events
203- # but have a complete clone for any other workflows.
204- # Both options fetch tags but since we're going to remove
205- # one from HEAD in non-create-tag workflows, we need full
206- # history for them.
207- fetch-depth : >-
208- ${{
209- (
210- github.event_name == 'create' &&
211- github.event.ref_type == 'tag'
212- ) &&
213- 1 || 0
214- }}
215- - name : Drop Git tags from HEAD for non-tag-create events
216- if : >-
217- github.event_name != 'create' ||
218- github.event.ref_type != 'tag'
219- run : >-
220- git tag --points-at HEAD
221- |
222- xargs git tag --delete
223- - name : Instruct setuptools-scm not to add a local version part
224- if : >-
225- github.event_name == 'push' &&
226- github.ref == format(
227- 'refs/heads/{0}', github.event.repository.default_branch
228- )
229- run : |
230- echo 'local_scheme = "no-local-version"' >> pyproject.toml
231- git update-index --assume-unchanged pyproject.toml
232- - name : Pre-populate tox env
233- run : >-
234- python -m
235- tox
236- --parallel auto
237- --parallel-live
238- --notest
239- --skip-missing-interpreters false
240- -vvvv
241- - name : Build dists
242- run : python -m tox -p auto --parallel-live -vvvv
243- - name : Publish to test.pypi.org
244- if : >-
245- (
246- github.event_name == 'push' &&
247- github.ref == format(
248- 'refs/heads/{0}', github.event.repository.default_branch
249- )
250- ) ||
251- (
252- github.event_name == 'create' &&
253- github.event.ref_type == 'tag'
254- )
255- uses : pypa/gh-action-pypi-publish@master
256- with :
257- password : ${{ secrets.testpypi_password }}
258- repository_url : https://test.pypi.org/legacy/
259- - name : Publish to pypi.org
260- if : >- # "create" workflows run separately from "push" & "pull_request"
261- github.event_name == 'create' &&
262- github.event.ref_type == 'tag'
263- uses : pypa/gh-action-pypi-publish@master
264- with :
265- password : ${{ secrets.pypi_password }}
0 commit comments