Skip to content

CI: add publish dry run #14

CI: add publish dry run

CI: add publish dry run #14

name: Build and test
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
workflow_dispatch:
jobs:
build_and_test:
strategy:
matrix:
python_version: ['3.10', '3.11']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: Setup Poetry
run: |
curl -fsS https://install.python-poetry.org | python - -y
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
poetry install
- name: Build
run: |
poetry run maturin build
poetry run maturin develop
- name: Run tests
run: |
poetry run python example.py
- name: Publish dry run
run: |
poetry run maturin build --release --out dist
poetry run maturin sdist --out dist
poetry publish --dry-run