build: set version to alpha #15
This file contains hidden or 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: CD | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| branches: | |
| - 'main' | |
| jobs: | |
| macos: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| target: [x64, aarch64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: build | |
| target: ${{ matrix.target }} | |
| args: --release -o dist --find-interpreter | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macos-wheels-${{ matrix.python-version }}-${{matrix.target}} | |
| path: dist | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| target: [x64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: build | |
| target: ${{ matrix.target }} | |
| args: --release -o dist --find-interpreter | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-wheels-${{ matrix.python-version }}-${{ matrix.target }} | |
| path: dist | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| target: [x86_64, aarch64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Build Wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: build | |
| target: ${{ matrix.target }} | |
| manylinux: manylinux_2_28 | |
| before-script-linux: | | |
| if [ "${{ matrix.target }}" = "x86_64" ]; then | |
| yum install -y openssl-devel | |
| export OPENSSL_NO_VENDOR=1 | |
| fi | |
| args: --release -o dist --find-interpreter | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-wheels-${{ matrix.python-version }}-${{ matrix.target }} | |
| path: dist | |
| # TODO Add pypy | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| if: "startsWith(github.ref, 'refs/tags/')" | |
| needs: [ macos, linux, windows] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: '*' | |
| merge-multiple: true | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| - name: Publish to PyPi | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_UPLOAD_TOKEN }} | |
| run: | | |
| pip install --upgrade twine | |
| twine upload --skip-existing * |