Publish ferreus_rmt to PyPI #3
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: Publish ferreus_rmt to PyPI | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| build: | |
| name: Build wheels | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| extra-args: "" | |
| - os: windows-latest | |
| extra-args: "" | |
| - os: macos-15-intel # Intel macOS | |
| extra-args: "" | |
| - os: macos-latest # Apple Silicon macOS | |
| extra-args: "" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Python (abi3 build) | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Build with maturin | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| rust-toolchain: "1.85.0" | |
| command: build | |
| args: --release --strip --out dist -m py_ferreus_rmt/Cargo.toml ${{ matrix.extra-args }} | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ferreus_rmt-dist-${{ matrix.os }} | |
| path: dist | |
| publish: | |
| name: Publish to PyPI (trusted publisher) | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/ferreus_rmt/ | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Download built wheels | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist |