Skip to content

Commit

Permalink
Update deploy-pypi.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Loren Eteval <[email protected]>
  • Loading branch information
LorenEteval committed Feb 4, 2025
1 parent 9cb583b commit ffa1d24
Showing 1 changed file with 18 additions and 38 deletions.
56 changes: 18 additions & 38 deletions .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,36 +10,25 @@ jobs:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, windows-2022, windows-2025, macos-13, macos-14, macos-15]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v4
with:
go-version: "1.23"
check-latest: true
- run: go version

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
check-latest: true
- run: python --version

- name: Install setuptools, wheel
run: >-
python -m
pip install
setuptools wheel
- name: Build source tarball
run: python setup.py sdist

- name: Install from source
run: python setup.py install

- name: Run sample.py
run: python sample/sample.py
- name: Install, build & run sample
run: |
go version
python --version
python -m pip install --upgrade pip
python -m pip install setuptools wheel
python setup.py sdist
python setup.py install
python sample/sample.py
store:
# Python 3.12 later version has package name twitch (Xray-core... -> xray_core...)
Expand All @@ -48,27 +37,21 @@ jobs:
runs-on: ubuntu-latest
needs:
- build

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.11"
check-latest: true
- run: python --version

- name: Install setuptools, wheel
run: >-
python -m
pip install
setuptools wheel
- name: Build source tarball
run: python setup.py sdist

- name: Install & build
run: |
python --version
python -m pip install --upgrade pip
python -m pip install setuptools wheel
python setup.py sdist
- name: Store the distribution packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: |
Expand All @@ -88,10 +71,9 @@ jobs:
url: https://pypi.org/p/Xray-core
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
Expand All @@ -104,14 +86,12 @@ jobs:
needs:
- publish-to-pypi
runs-on: ubuntu-latest

permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
Expand Down

0 comments on commit ffa1d24

Please sign in to comment.