Skip to content

[pre-commit.ci] pre-commit autoupdate #833

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #833

Workflow file for this run

name: main
on: [push, pull_request, workflow_dispatch]
jobs:
build:
name: ${{ matrix.pyver }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
pyver: [cp38, cp39, cp310, cp311]
version: [2.28.3]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Create source dist
run: python setup.py sdist
- name: Upload source dist
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
if-no-files-found: error
- name: Build and test wheels
uses: pypa/cibuildwheel@v2.14
env:
CIBW_BUILD: ${{ matrix.pyver }}-*
CIBW_ENVIRONMENT: VERSION=${{ matrix.version }}
CIBW_ENVIRONMENT_MACOS: >
VERSION=${{ matrix.version }}
LDFLAGS="-Wl,-headerpad_max_install_names"
CIBW_ENVIRONMENT_WINDOWS: >
VERSION=${{ matrix.version }}
LIB=$GITHUB_WORKSPACE\\_lib\\mbedtls\\visualc\\VS2010\\x64\\Release
INCLUDE=$GITHUB_WORKSPACE\\_lib\\mbedtls\\include
- name: Inventory
run: ls wheelhouse
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: wheelhouse/
if-no-files-found: error
publish:
name: Publish packages
runs-on: ubuntu-latest
permissions:
contents: read
needs: build
if: >
github.event_name == 'push'
&& startsWith(github.ref, 'refs/tags')
&& github.repository == 'Synss/python-mbedtls'
steps:
- name: Download source packages
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Download wheels
uses: actions/download-artifact@v3
with:
name: wheels
path: dist
- name: List dir content
run: ls dist
- name: Publish to pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}