2323 - name : Checkout
2424 uses : actions/checkout@v3
2525 - name : Set up Python ${{ matrix.python-version }}
26- uses : actions/setup-python@v3
26+ uses : actions/setup-python@v4
2727 with :
2828 python-version : ${{ matrix.python-version }}
2929 - name : Install Rust
@@ -32,10 +32,32 @@ jobs:
3232 profile : minimal
3333 toolchain : stable
3434 override : true
35+ - name : Install Cross-compilers (macOS)
36+ if : matrix.os == 'macos-latest'
37+ run : |
38+ rustup target add x86_64-apple-darwin
39+ rustup target add aarch64-apple-darwin
3540 - name : Publish Package
36- uses : messense /maturin-action@v1
41+ uses : PyO3 /maturin-action@v1
3742 with :
3843 command : publish
39- args : --username=__token__ -- no-sdist --interpreter=python${{ !startsWith(matrix.os, 'windows') && matrix.python-version || '' }}
44+ args : --username=__token__ ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.7' && '' || '-- no-sdist' }} --interpreter=python${{ !startsWith(matrix.os, 'windows') && matrix.python-version || '' }}
4045 env :
4146 MATURIN_PASSWORD : ${{ secrets.pypi_password }}
47+ if : matrix.os != 'macos-latest'
48+ - name : Publish macOS (x86_64) Package
49+ if : matrix.os == 'macos-latest'
50+ uses : PyO3/maturin-action@v1
51+ with :
52+ command : publish
53+ args : --username=__token__ --interpreter=python${{ matrix.python-version }} --target=x86_64-apple-darwin --no-sdist
54+ env :
55+ MATURIN_PASSWORD : ${{ secrets.pypi_password }}
56+ - name : Publish macOS (arm64) Package
57+ if : matrix.os == 'macos-latest'
58+ uses : PyO3/maturin-action@v1
59+ with :
60+ command : publish
61+ args : --username=__token__ --interpreter=python${{ matrix.python-version }} --target=aarch64-apple-darwin --no-sdist
62+ env :
63+ MATURIN_PASSWORD : ${{ secrets.pypi_password }}
0 commit comments