Port ChoreoLib to Python #1
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: ChoreoLib / Build Python | |
on: [push, pull_request] | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- run: pip3 install setuptools wheel pytest | |
- run: python3 setup.py sdist bdist_wheel | |
working-directory: ./choreolib/py | |
- run: pip3 install --no-cache-dir dist/*.whl | |
working-directory: ./choreolib/py | |
- run: pytest | |
working-directory: ./choreolib/py | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: ./choreolib/py/dist/ | |
- name: Publish package distributions to PyPI | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages_dir: ./choreolib/py/dist/ | |
permissions: | |
# IMPORTANT: this permission is mandatory for trusted publishing | |
id-token: write |