From 83b4914bb0ba133b649f55ea8e88cbc8a14ea91c Mon Sep 17 00:00:00 2001 From: drewcassidy Date: Mon, 12 Apr 2021 15:57:06 -0700 Subject: [PATCH] split build and publish --- .github/workflows/python-package.yml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 883058a..3d23c4b 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -44,7 +44,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 ninja Pillow click nose parameterized + python -m pip install flake8 ninja setuptools-scm - name: Lint with flake8 run: | @@ -59,7 +59,7 @@ jobs: - name: Test with nose run: nosetests tests -d - publish-wheel: + build: needs: test runs-on: ${{ matrix.os }} strategy: @@ -93,20 +93,20 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install wheel twine setuptools + python -m pip install setuptools setuptools-scm wheel twine python -m pip install build --user - name: Build a binary wheel run: python -m build --wheel --outdir dist/ - - name: Publish to Test PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Upload wheel as artifact + uses: actions/upload-artifact@v2 with: - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ + name: dist + path: dist - publish-sdist: - needs: test + publish: + needs: build runs-on: ubuntu-latest steps: @@ -115,10 +115,18 @@ jobs: with: python-version: '3.x' + - name: Download artifacts + uses: actions/download-artifact@v2 + with: + path: dist + + - name: List artifacts + run: ls -l dist + - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install setuptools wheel twine + python -m pip install setuptools setuptools-scm wheel twine python -m pip install build --user - name: Build a source tarball