Fix syntax error in setup.py #46
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
on: push | |
name: CI | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: | |
- '3.12.4' | |
- '3.11.9' | |
- '3.10.14' | |
- '3.9.19' | |
- '3.8.18' | |
name: Python ${{ matrix.python }} | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Setup python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install pipenv | |
run: python -m pip install --upgrade pipenv wheel | |
- name: Setup Pipenv | |
run: pipenv --python ${{ matrix.python }} | |
- name: Install pip dependencies | |
run: pipenv install --deploy --dev --pre | |
- name: Check format | |
run: pipenv run test-format | |
- name: Unit test | |
run: pipenv run test-unit | |
deploy: | |
needs: test | |
if: contains(github.ref, 'refs/tags/releases/v') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install pipenv | |
run: python -m pip install --upgrade twine wheel pipenv | |
- name: Install pip dependencies | |
run: pipenv install --deploy | |
- name: Generate requirements | |
run: pipenv requirements > requirements.txt | |
- name: Get version | |
run: | | |
echo ${{ github.ref }} | sed 's/refs\/tags\/releases\/v//g' > VERSION | |
cat VERSION | |
- name: Build | |
run: python setup.py sdist bdist_wheel | |
- name: Publish distribution 📦 to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
run: twine upload dist/* | |