diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 88ce34a0c..a0b25dec7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,14 +23,14 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install build wheel twine + pip install setuptools wheel twine build toml - name: Build package - run: python setup.py sdist bdist_wheel + run: python -m build --sdist --wheel --outdir dist/ - name: Check if package version already exists run: | - PACKAGE_NAME=$(python setup.py --name) + PACKAGE_NAME=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['name'])") PACKAGE_VERSION=${{ github.event.inputs.version }} if twine check dist/*; then if pip install $PACKAGE_NAME==$PACKAGE_VERSION; then