Skip to content

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

[pre-commit.ci] pre-commit autoupdate

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

Workflow file for this run

name: macOS Build
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
strategy:
matrix:
python-version: ['3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install build tools
run: |
brew install swig softhsm
- name: Build
run: |
python -m venv temp
source temp/bin/activate
pip3 install -r dev-requirements.txt
make
python setup.py bdist_wheel
- name: Tests
run: |
softhsm2-util --init-token --slot 0 --label "A token" --pin 1234 --so-pin 123456
source temp/bin/activate
make install
make test
- uses: actions/upload-artifact@v7
with:
name: wheel-${{ matrix.python-version }}
path: dist/*.whl
publish:
name: "PyPI Publish"
needs: "build"
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: "ubuntu-latest"
environment:
name: pypi
url: https://pypi.org/p/pyscard
permissions:
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
- name: move wheels to dist/
run: |
mkdir -v dist
mv -v wheel-*/*.whl dist/
ls -al dist/
- name: Publish wheels to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0