name: Package on: workflow_call: inputs: python_version: description: 'Python version.' required: false default: '3.10' type: string artifact: description: 'Name of the wheel artifact.' required: true type: string jobs: Package: name: 📦 Package in Wheel Format runs-on: ubuntu-latest steps: - name: 📥 Checkout repository uses: actions/checkout@v2 - name: 🐍 Setup Python ${{ inputs.python_version }} uses: actions/setup-python@v2 with: python-version: ${{ inputs.python_version }} - name: 🔧 Install dependencies for packaging and release run: | python -m pip install --upgrade pip pip install wheel - name: 🔨 Build Python package (source distribution) run: python setup.py sdist - name: 🔨 Build Python package (binary distribution - wheel) run: python setup.py bdist_wheel - name: 📤 Upload wheel artifact uses: actions/upload-artifact@v2 with: name: ${{ inputs.artifact }} path: dist/ if-no-files-found: error retention-days: 1