Skip to content

Commit

Permalink
Seperate store package distribution step
Browse files Browse the repository at this point in the history
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
  • Loading branch information
LorenEteval committed Apr 29, 2024
1 parent e3a229e commit 1499cd3
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1499cd3

Please sign in to comment.