From 1499cd30cde293704c71a5f6621e5718d05c1e4e Mon Sep 17 00:00:00 2001 From: Loren Eteval Date: Mon, 29 Apr 2024 17:17:30 +0800 Subject: [PATCH] Seperate store package distribution step Signed-off-by: Loren Eteval --- .github/workflows/deploy-pypi.yml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.github/workflows/deploy-pypi.yml b/.github/workflows/deploy-pypi.yml index d3d53e3..bed3701 100644 --- a/.github/workflows/deploy-pypi.yml +++ b/.github/workflows/deploy-pypi.yml @@ -47,12 +47,46 @@ jobs: dist/*.tar.gz dist/*.whl + store: + # Python 3.12 later version has package name twitch (Xray-core... -> xray_core...) + # See v1.8.10 runner history for more details + name: Store the distribution packages + runs-on: ubuntu-latest + needs: + - build + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: "3.11" + - run: python --version + + - name: Install setuptools, wheel + run: >- + python -m + pip install + setuptools wheel + + - name: Build source tarball + run: python setup.py sdist + + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: | + dist/*.tar.gz + dist/*.whl + publish-to-pypi: name: >- Publish Python 🐍 distribution 📦 to PyPI if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes needs: - build + - store runs-on: ubuntu-latest environment: name: deploy-pypi