Open iglesu opened 5 months ago
Break it in two jobs, one that builds all the python versions and the other one that just uploads once.
maybe set a job-level output say package-dir i.e. jobs: build: runs-on: ubuntu-latest strategy: matrix: python-version: ['3.9', '3.10', '3.11'] outputs: package-dir: ${{ steps.build.outputs.package-dir }}
and then in the upload job:
name: Upload package to PyPI env: TWINE_USERNAME: token TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} PYPI_REPO_URL: '' run: | if [ -z "${{ env.PYPI_REPO_URL }}" ]; then twine upload --verbose ${{ needs.build.outputs.package-dir }}/ else twine upload --verbose --repository-url "${{ env.PYPI_REPO_URL }}" ${{ needs.build.outputs.package-dir }}/ fi
or something like that
Break it in two jobs, one that builds all the python versions and the other one that just uploads once.
maybe set a job-level output say package-dir i.e. jobs: build: runs-on: ubuntu-latest strategy: matrix: python-version: ['3.9', '3.10', '3.11'] outputs: package-dir: ${{ steps.build.outputs.package-dir }}
and then in the upload job:
name: Upload package to PyPI env: TWINE_USERNAME: token TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} PYPI_REPO_URL: '' run: | if [ -z "${{ env.PYPI_REPO_URL }}" ]; then twine upload --verbose ${{ needs.build.outputs.package-dir }}/ else twine upload --verbose --repository-url "${{ env.PYPI_REPO_URL }}" ${{ needs.build.outputs.package-dir }}/ fi
or something like that