From 34bb2da3b2957bebd493f9e72e24bed37d507202 Mon Sep 17 00:00:00 2001 From: feng-tao Date: Mon, 17 Aug 2020 21:55:25 -0700 Subject: [PATCH] chore: add pypi publish action Signed-off-by: feng-tao --- .github/workflows/pypipublish.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/pypipublish.yml diff --git a/.github/workflows/pypipublish.yml b/.github/workflows/pypipublish.yml new file mode 100644 index 0000000..a0ddd06 --- /dev/null +++ b/.github/workflows/pypipublish.yml @@ -0,0 +1,29 @@ + +name: Build and Deploy +on: + push: + branches: + - master + tags: + - '*' +jobs: + build-and-publish-python-module: + name: Build and publish python module to pypi + runs-on: ubuntu-18.04 + steps: + - name: Checkout + uses: actions/checkout@v1 + - name: Setup python 3.6 + uses: actions/setup-python@v1 + with: + python-version: 3.6 + - name: Add wheel dependency + run: pip install wheel + - name: Generate dist + run: python setup.py sdist bdist_wheel + - name: Publish to PyPI + if: startsWith(github.event.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_password }}