Release Polyglot Piranha #86
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Polyglot Piranha | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, ubuntu-20.04, macos-latest] | |
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Setup rustup target linux aarch64 | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install gcc-aarch64-linux-gnu | |
rustup target add aarch64-unknown-linux-gnu | |
- name: Setup rustup target macOS | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: | | |
rustup target add x86_64-apple-darwin | |
rustup target add aarch64-apple-darwin | |
- name: Build wheel with Maturin linux | |
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-20.04' }} | |
run: | | |
pip install --upgrade maturin | |
maturin build --release -o dist | |
maturin build --sdist -o dist | |
- name: Build wheel with Maturin macOS | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: | | |
pip install --upgrade maturin | |
maturin build --release -o dist --target universal2-apple-darwin -i ${{ matrix.python-version }} | |
- name: Pypi Release | |
run: | | |
pip install twine | |
twine upload --repository testpypi --skip-existing -u __token__ -p ${{ secrets.TEST_PYPI_TOKEN }} dist/* |