From c6a7923eeb7135467d926f13e751f8f5b642b5db Mon Sep 17 00:00:00 2001 From: cxykevin Date: Tue, 16 Apr 2024 21:47:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0build=E5=AE=8C=E6=88=90publis?= =?UTF-8?q?h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 90765d5..eccfac8 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -5,6 +5,9 @@ on: [push] jobs: Run: runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/ steps: - name: Info run: echo "OS=${{ runner.os }} NAME=${{ gitea.event_name }} REPO=${{ gitea.repository }} BRANCH=${{ gitea.ref }} ST=${{ job.status }}" @@ -16,15 +19,19 @@ jobs: echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free">>/etc/apt/sources.list echo "deb https://security.debian.org/debian-security bullseye-security main contrib non-free">>/etc/apt/sources.list cat /etc/apt/sources.list - echo "--- uddate source ---" + echo "--- update source ---" apt-get update - name: Prepare Python run: | apt-get install python3-pip -y - python3 -m pip install setuptools + python3 -m pip install setuptools wheel twine - name: CheckOut uses: http://hmtsai.cn:3000/actions/checkout@v4 - name: Build run: python3 setup.py build - name: Publish - run: echo "Publish..." + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + twine upload dist/*