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/*