From 76679700c9fb101358a0d6f340b76fce983e77e3 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Wed, 16 Jun 2021 14:31:59 +0100 Subject: [PATCH] Remove publish from tox (#41) --- .github/workflows/tox.yml | 72 --------------------------------------- 1 file changed, 72 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 4cb6815..a084d9b 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -71,75 +71,3 @@ jobs: run: | echo "${{ matrix.PREFIX }} tox -e ${{ matrix.tox_env }}" ${{ matrix.PREFIX }} tox -e ${{ matrix.tox_env }} - - publish: - name: Publish to PyPI registry - needs: - - build - runs-on: ubuntu-latest - - env: - PY_COLORS: 1 - TOXENV: packaging - - steps: - - name: Switch to using Python 3.6 by default - uses: actions/setup-python@v2 - with: - python-version: 3.6 - - name: Install tox - run: python -m pip install --user tox - - name: Check out src from Git - uses: actions/checkout@v2 - with: - # Get shallow Git history (default) for release events - # but have a complete clone for any other workflows. - # Both options fetch tags but since we're going to remove - # one from HEAD in non-create-tag workflows, we need full - # history for them. - fetch-depth: >- - ${{ - ( - ( - github.event_name == 'create' && - github.event.ref_type == 'tag' - ) || - github.event_name == 'release' - ) && - 1 || 0 - }} - - name: Drop Git tags from HEAD for non-tag-create and non-release events - if: >- - ( - github.event_name != 'create' || - github.event.ref_type != 'tag' - ) && - github.event_name != 'release' - run: >- - git tag --points-at HEAD - | - xargs git tag --delete - - name: Build dists - run: python -m tox - - name: Publish to test.pypi.org - if: >- - ( - github.event_name == 'push' && - github.ref == format( - 'refs/heads/{0}', github.event.repository.default_branch - ) - ) || - ( - github.event_name == 'create' && - github.event.ref_type == 'tag' - ) - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.testpypi_password }} - repository_url: https://test.pypi.org/legacy/ - - name: Publish to pypi.org - if: >- # "create" workflows run separately from "push" & "pull_request" - github.event_name == 'release' - uses: pypa/gh-action-pypi-publish@master - with: - password: ${{ secrets.pypi_password }}