Fix Python path on macOS ARM64

This commit is contained in:
Wilson Lin 2021-11-12 16:27:52 +11:00
parent cc1b0d4e2b
commit 9cd0bf2ae4
1 changed files with 6 additions and 1 deletions

View File

@ -96,7 +96,12 @@ jobs:
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
fi
maturin build --release --strip -i "$(which python)"
if [[ "${{ runner.name }}" == macos-arm64 ]]; then
pathToPython="$(which python3)"
else
pathToPython="$(which python)"
fi
maturin build --release --strip -i "$pathToPython"
if [[ "$GITHUB_REF" == refs/tags/v* ]]; then
twine upload target/wheels/*
else