From a8a6a3fa9a6a2bf2da223668b10f0662dc5014ae Mon Sep 17 00:00:00 2001 From: chfl4gs <55137784+chfl4gs@users.noreply.github.com> Date: Sun, 14 Jun 2020 01:46:10 +0800 Subject: [PATCH] PyPI test check (#1296) * Adding Travis-CI cmake static * adding pypi test --- .github/workflows/python-publish.yml | 33 ++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 35ce5fb1..11d9e68b 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -3,7 +3,7 @@ name: PyPI 📦 Distribution on: [push] jobs: - deploy: + build: runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -48,13 +48,28 @@ jobs: - uses: actions/upload-artifact@v2 with: - name: unicorn-packages-${{ matrix.os }}-${{ matrix.platform }} path: ${{ github.workspace }}/bindings/python/dist/* - - name: Publish distribution 📦 to PyPI - if: startsWith(github.event.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.pypi_pass }} - packages_dir: ${{ github.workspace }}/bindings/python/dist/ + publish: + needs: [build] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags') + steps: + - uses: actions/download-artifact@v2 + with: + name: artifact + path: dist + + - name: Publish distribution 📦 to test PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.testpypi_pass }} + repository_url: https://test.pypi.org/legacy/ + + - name: Publish distribution 📦 to PyPI + if: ${{ success() }} + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_pass }}