v0.2.26-alpha #33
Workflow file for this run
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: Build and Publish Rust Binding | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: read | |
jobs: | |
build-and-publish: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-13] | |
python-version: ['3.11', '3.12'] | |
include: | |
- os: ubuntu-latest | |
python-version: '3.11' | |
publish: true | |
- os: windows-latest | |
python-version: '3.11' | |
publish: true | |
- os: macos-13 | |
python-version: '3.11' | |
publish: true | |
- os: ubuntu-latest | |
python-version: '3.12' | |
publish: true | |
- os: windows-latest | |
python-version: '3.12' | |
publish: true | |
- os: macos-13 | |
python-version: '3.12' | |
publish: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Maturin | |
run: | | |
python -m pip install --upgrade pip | |
pip install maturin | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Change to sagepy-connector directory | |
run: cd sagepy-connector | |
- name: Build with Maturin | |
run: | | |
cd sagepy-connector | |
maturin build --release | |
- name: Publish | |
if: matrix.publish | |
env: | |
MATURIN_PYPI_TOKEN: ${{ secrets.SAGEPY_CONNECTOR_PYPI_API_TOKEN }} | |
run: | | |
cd sagepy-connector | |
maturin publish --no-sdist |