diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 26d8059..a4a733c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -15,7 +15,7 @@ jobs: max-parallel: 4 matrix: os: [windows-latest, ubuntu-latest] - python-version: ["3.10"] + python-version: ["3.11"] defaults: run: working-directory: python diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 04e861e..dd6dcec 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,7 +10,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ["3.10"] + python-version: ["3.11"] defaults: run: working-directory: python @@ -22,20 +22,20 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python3 -m pip install --upgrade pip setuptools wheel twine + python3 -m pip install --upgrade pip build wheel twine python3 -m pip install -r requirements.txt - name: Install module run: | - python3 setup.py install + python3 -m pip install . - name: Test with coverage and pytest run: | python3 -m pytest tests/ - name: Generate distribution archives run: | - python3 setup.py sdist bdist_wheel + python3 -m build - name: Upload the distribution archives run: | - python3 -m twine upload dist/* + python3 -m twine upload --verbose dist/* env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} diff --git a/python/setup.py b/python/setup.py index ee6a63a..b52dc94 100644 --- a/python/setup.py +++ b/python/setup.py @@ -6,7 +6,7 @@ assert os.environ.get("GITHUB_REF_TYPE") == "tag" assert os.environ.get("GITHUB_REF_NAME") -VERSION = os.environ["GITHUB_REF_NAME"] +VERSION = os.environ["GITHUB_REF_NAME"].lstrip("v") with open("../README.md", "r") as fh: