From 57c8f527b0e37198641799d7b94ef921d8f6fa37 Mon Sep 17 00:00:00 2001 From: "gate.io" <32661171+gateio@users.noreply.github.com> Date: Tue, 30 Mar 2021 10:17:08 +0800 Subject: [PATCH 1/2] Create python-publish.yml --- .github/workflows/python-publish.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/python-publish.yml diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml new file mode 100644 index 0000000..6a6d6d8 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,32 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries + +name: Upload Python Package + +on: push + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + - name: Build and publish + run: | + python setup.py sdist bdist_wheel + - name: Publish package + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + user: __token__ + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ From 0381467bf1f58a4a73a20069bf16352cf45ecbbc Mon Sep 17 00:00:00 2001 From: "gate.io" <32661171+gateio@users.noreply.github.com> Date: Tue, 30 Mar 2021 10:22:21 +0800 Subject: [PATCH 2/2] commit to pypi directly --- .github/workflows/python-publish.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 6a6d6d8..e922d81 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -28,5 +28,4 @@ jobs: uses: pypa/gh-action-pypi-publish@v1.4.2 with: user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ + password: ${{ secrets.PYPI_API_TOKEN }}