Changed bindings
module name
#5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release a new version in PyPI | |
on: | |
push: | |
branches: | |
- "preproduction" | |
jobs: | |
check-version: | |
name: Check version of the released package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Read version from pyproject.toml | |
id: pyproject_version | |
uses: SebRollen/[email protected] | |
with: | |
file: "pyproject.toml" | |
field: "version" | |
- name: Read version from vcpkg.json | |
id: vcpkg_version | |
uses: ActionsTools/read-json-action@main | |
with: | |
file_path: "mini_face_oxidized/open_face_api/vcpkg.json" | |
prop_path: "version" | |
# TODO: think about reusing this job instead of copying | |
build: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-15] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install vcpkg | |
uses: lukka/[email protected] | |
# Separate vcpkg installation procedure on Linux | |
if: runner.os != 'Linux' | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir dist | |
- name: Show obtained wheels and some debug info | |
run: | | |
ls ./dist | |
- name: Store wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: ./dist/*.whl | |
publish: | |
name: >- | |
Publish Python 🐍 distribution 📦 to PyPI | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
environment: | |
name: test-pypi | |
url: https://test.pypi.org/p/mini-face-oxidized | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
pip install twine | |
- name: Download all the wheels | |
uses: actions/download-artifact@v3 | |
with: | |
name: wheels | |
path: dist/ | |
- name: Publish distribution to Test PyPI | |
run: | | |
twine upload -r testpypi dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_KEY }} |