Skip to content

Commit

Permalink
update publish flow
Browse files Browse the repository at this point in the history
  • Loading branch information
codekansas committed Nov 12, 2024
1 parent b26b958 commit 312390f
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
cancel-in-progress: true

jobs:
publish-python:
build-wheels:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
Expand Down Expand Up @@ -56,10 +56,8 @@ jobs:
CIBW_ENVIRONMENT: |
PATH="/usr/local/bin:$HOME/.cargo/bin:$PATH"
CARGO_NET_GIT_FETCH_WITH_CLI=true
CIBW_BUILD_COMMAND: |
python -m pip install build
python -m build --sdist
run: cibuildwheel --output-dir dist
run: |
cibuildwheel --output-dir dist
- name: Upload wheel artifacts
uses: actions/upload-artifact@v3
Expand All @@ -69,8 +67,44 @@ jobs:
dist/*.whl
dist/*.tar.gz
build-source-dist:
name: Build and publish Python package (source distribution)
timeout-minutes: 10
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
shell: bash

- name: Build source distribution
run: |
python -m build --sdist --outdir dist
- name: Upload source distribution
uses: actions/upload-artifact@v3
with:
name: source-dist
path: |
dist/*.tar.gz
publish-wheels:
needs: publish-python
needs: [build-wheels, build-source-dist]
name: Publish Python wheels
timeout-minutes: 10
runs-on: ubuntu-latest
Expand Down

0 comments on commit 312390f

Please sign in to comment.