diff --git a/.github/workflows/Package.yml b/.github/workflows/Package.yml index 91a5048..a559573 100644 --- a/.github/workflows/Package.yml +++ b/.github/workflows/Package.yml @@ -33,7 +33,7 @@ on: requirements: description: 'Python dependencies to be installed through pip.' required: false - default: 'wheel' + default: '' type: string artifact: description: 'Name of the package artifact.' @@ -55,17 +55,38 @@ jobs: with: python-version: ${{ inputs.python_version }} - - name: 🔧 Install dependencies for packaging and release - run: | - python -m pip install -U pip - python -m pip install ${{ inputs.requirements }} + - name: 🐍 Update pip + run: python -m pip install -U pip - - name: 🔨 Build Python package (source distribution) + # build + + - name: 🔧 [build] Install dependencies for packaging and release + if: inputs.requirements == '' + run: python -m pip install build + + - name: 🔨 [build] Build Python package (source distribution) + if: inputs.requirements == '' + run: python -m build --sdist + + - name: 🔨 [build] Build Python package (binary distribution - wheel) + if: inputs.requirements == '' + run: python -m build --wheel + + # setuptools + + - name: 🔧 [setuptools] Install dependencies for packaging and release + if: inputs.requirements != '' + run: python -m pip install ${{ inputs.requirements }} + + - name: 🔨 [setuptools] Build Python package (source distribution) + if: inputs.requirements != '' run: python setup.py sdist - - name: 🔨 Build Python package (binary distribution - wheel) + - name: 🔨 [setuptools] Build Python package (binary distribution - wheel) + if: inputs.requirements != '' run: python setup.py bdist_wheel + - name: 📤 Upload wheel artifact uses: actions/upload-artifact@v2 with: