From dcc115fda7255580e4e4d64135b0bbfe2a317191 Mon Sep 17 00:00:00 2001 From: Chen Zhiyang <1792266893@qq.com> Date: Tue, 29 Oct 2024 19:40:50 +0800 Subject: [PATCH] added a python publish workflow (#1281) (#1282) * added a python publish workflow * minor --------- Signed-off-by: Zhang Jun Co-authored-by: jzhang533 --- .github/workflows/python-publish.yml | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 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 00000000..9106ce99 --- /dev/null +++ b/.github/workflows/python-publish.yml @@ -0,0 +1,34 @@ +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U wheel + pip install -U setuptools + pip install -r requirements.txt + + - name: Build package + run: python setup.py bdist_wheel + - name: Publish package + uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}