Improve selection of Python versions

This commit is contained in:
Dirkjan Ochtman 2021-09-01 08:59:06 +02:00
parent 950faa6854
commit ef38bedaa2
1 changed files with 28 additions and 9 deletions

View File

@ -6,27 +6,26 @@ on:
- py-* - py-*
jobs: jobs:
Publish: Unix:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-latest, windows-latest] os: [ubuntu-latest, macos-latest]
python: [3.7, 3.8, 3.9] python: [3.7, 3.8, 3.9]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
environment: "Publish wheels" environment: "Publish wheels"
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: x64
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: stable toolchain: stable
override: true override: true
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Publish - name: Publish
uses: messense/maturin-action@v1 uses: messense/maturin-action@v1
with: with:
@ -34,5 +33,25 @@ jobs:
args: -m instant-segment-py/Cargo.toml args: -m instant-segment-py/Cargo.toml
--no-sdist --no-sdist
--username __token__ --username __token__
--password ${{ secrets.MATURIN_PASSWORD }} --password ${{ secrets.PYPI_TOKEN }}
--interpreter $(python${{ matrix.python }} -V 2>&1 | cut -d ' ' -f 2) --interpreter python${{ matrix.python }}
Windows:
runs-on: windows-latest
environment: "Publish wheels"
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Publish all versions
uses: messense/maturin-action@v1
with:
command: publish
args: -m instant-segment-py/Cargo.toml
--no-sdist
--username __token__
--password ${{ secrets.PYPI_TOKEN }}