trying a new python version aware packaging #59
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: Poetry publish | |
on: | |
push: | |
branches: ["master"] | |
pull_request: | |
branches: ["master"] | |
jobs: | |
buildPush: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- python-version: '3.11' | |
extras: 'torch' | |
- python-version: '3.10' | |
extras: 'pax' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
- name: Set Version number | |
run: | | |
poetry version 1.2.1 # Or use dynamic versioning if needed | |
- name: Build and Publish to PyPI | |
run: | | |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
poetry build --extras ${{ matrix.extras }} | |
poetry publish --build |