Skip to content

Update version and description in pyproject.toml #6

Update version and description in pyproject.toml

Update version and description in pyproject.toml #6

Workflow file for this run

name: Build and Publish Wheels
on:
push:
branches: [ main, develop ]
tags: [ 'v*' ]
pull_request:
branches: [ main, develop ]
jobs:
build:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install build dependencies
run: python -m pip install --upgrade pip setuptools wheel build
- name: Build wheel and sdist
run: python -m build
- name: List built artifacts
shell: bash
run: ls -lh dist/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: dist/
retention-days: 7
test:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Download built wheel
uses: actions/download-artifact@v4
with:
name: wheels-ubuntu-latest
path: dist/
- name: Install wheel
run: |
python -m pip install --upgrade pip
pip install dist/*.whl
- name: Install test dependencies
run: pip install pytest pytest-cov
- name: Run tests
run: pytest -v
publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/')
needs: test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/libcrypto
steps:
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install build dependencies
run: python -m pip install --upgrade pip build
- name: Build wheel and sdist
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}