Skip to content
Merged
20 changes: 12 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
pull_request:
workflow_dispatch:

env:
POETRY_VERSION: "2.2.1"

jobs:
build:
name: Build package
Expand All @@ -15,15 +18,14 @@ jobs:
uses: actions/setup-python@v5
with:
cache: "pip"
- name: Install pypa/build
run: >-
python3 -m pip install --user
build
twine
- name: Install poetry
run: python3 -m pip install poetry==${{ env.POETRY_VERSION }}
- name: Install build dependencies
run: poetry install --only build
- name: Build a binary wheel and a source tarball
run: python3 -m build
run: poetry run python -m build
- name: Check the distribution files with `twine`
run: twine check --strict dist/*
run: poetry run twine check --strict dist/*
- name: Upload artifact
id: artifact-upload-step
uses: actions/upload-artifact@v4
Expand All @@ -36,6 +38,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.9"
Expand Down Expand Up @@ -70,7 +73,8 @@ jobs:

- name: Install poetry
run: |
python -m pip install poetry==2.0.0
# When upgrading poetry, remember to upgrade poetry-core in `pyproject.toml` (`build-system.requires`)
python -m pip install poetry==${{ env.POETRY_VERSION }}

- name: Configure poetry
run: |
Expand Down
Loading
Loading