Bring the prod release action script in line with the working test release.

This commit is contained in:
Josh W 2024-09-06 13:36:13 -04:00
parent 33a330641f
commit 6fa95fd45d

View file

@ -22,7 +22,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install build twine
@ -32,6 +32,7 @@ jobs:
- name: Put SDist in artifact container
uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
- name: Check SDist metadata
run: |
@ -42,33 +43,18 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
bitness: [32, 64]
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
python: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- os: windows-latest
bitness: 64
platform_id: win_amd64
- os: windows-latest
bitness: 32
platform_id: win32
- os: ubuntu-latest
bitness: 64
platform_id: manylinux_x86_64
- os: ubuntu-latest
bitness: 32
platform_id: manylinux_i686
- os: macos-latest
bitness: 64
platform_id: macosx_x86_64
exclude:
- os: macos-latest
bitness: 32
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up QEMU on Linux images
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Get Python Version Name
uses: mad9000/actions-find-and-replace-string@5
id: pythonversion
@ -76,27 +62,36 @@ jobs:
source: ${{ matrix.python }}
find: '.'
replace: ''
- name: "Install Python 3.8 universal2 on macOS arm64"
if: runner.os == 'macOS' && runner.arch == 'arm64'
uses: actions/setup-python@v5
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
with:
python-version: 3.8
- name: Build wheels
uses: joerick/cibuildwheel@v2.20.0
env:
CIBW_BUILD: cp${{ steps.pythonversion.outputs.value }}-${{ matrix.platform_id }}
CIBW_BUILD: "cp${{ steps.pythonversion.outputs.value }}-*"
CIBW_ENVIRONMENT: "SETUPTOOLS_SCM_PRETEND_VERSION=${{ github.event.inputs.overrideVersion }}"
- name: Upload wheels to artifact container
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: wheelhouse/*.whl
upload_all:
needs: [build_wheels, make_sdist]
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- name: Get SDist and wheels from artifact container
uses: actions/download-artifact@v4
with:
name: artifact
pattern: cibw-*
path: dist
- name: Publish wheels to Test PyPI
uses: pypa/gh-action-pypi-publish@v1.10.1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
merge-multiple: true
- name: Publish wheels to PyPI
uses: pypa/gh-action-pypi-publish@release/v1