feat: publish for multiple python versions

This commit is contained in:
James
2023-05-14 11:40:30 +01:00
committed by GitHub
parent 7edcaeeb46
commit 795f95dc0e
+13 -5
View File
@@ -9,6 +9,9 @@ on:
jobs: jobs:
macos: macos:
runs-on: macos-latest runs-on: macos-latest
strategy:
matrix:
python_version: [3.9, 3.10, 3.11]
steps: steps:
- name: Checkout project - name: Checkout project
uses: actions/checkout@v3 uses: actions/checkout@v3
@@ -16,7 +19,7 @@ jobs:
- name: Python setup - name: Python setup
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: 3.9 python-version: ${{ matrix.python_version }}
architecture: x64 architecture: x64
- name: Rust setup - name: Rust setup
@@ -57,6 +60,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
matrix: matrix:
python_version: [3.9, 3.10, 3.11]
target: [x64, x86] target: [x64, x86]
steps: steps:
- name: Checkout project - name: Checkout project
@@ -65,7 +69,7 @@ jobs:
- name: Python setup - name: Python setup
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: 3.9 python-version: ${{ matrix.python_version }}
architecture: ${{ matrix.target }} architecture: ${{ matrix.target }}
- name: Rust setup - name: Rust setup
@@ -96,6 +100,7 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
strategy: strategy:
matrix: matrix:
python_version: [3.9, 3.10, 3.11]
target: [x86_64, i686] target: [x86_64, i686]
steps: steps:
- name: Checkout project - name: Checkout project
@@ -104,7 +109,7 @@ jobs:
- name: Python setup - name: Python setup
uses: actions/setup-python@v4 uses: actions/setup-python@v4
with: with:
python-version: 3.9 python-version: ${{ matrix.python_version }}
architecture: x64 architecture: x64
- name: Build wheels - name: Build wheels
@@ -112,7 +117,7 @@ jobs:
with: with:
target: ${{ matrix.target }} target: ${{ matrix.target }}
manylinux: auto manylinux: auto
args: --release --out dist -i 3.9 args: --release --out dist -i ${{ matrix.python_version }}
- name: Install built wheel - name: Install built wheel
if: matrix.target == 'x86_64' if: matrix.target == 'x86_64'
@@ -129,6 +134,9 @@ jobs:
release: release:
name: Release name: Release
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
python_version: [3.9, 3.10, 3.11]
needs: [ macos, windows, linux ] needs: [ macos, windows, linux ]
steps: steps:
- name: Get artifacts - name: Get artifacts
@@ -139,7 +147,7 @@ jobs:
- name: Python setup - name: Python setup
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: 3.9 python-version: ${{ matrix.python_version }}
- name: Publish to PyPi - name: Publish to PyPi
env: env: