Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix datalab_pip.yml to upload only once #70

Open
iglesu opened this issue May 29, 2024 · 0 comments
Open

fix datalab_pip.yml to upload only once #70

iglesu opened this issue May 29, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@iglesu
Copy link
Contributor

iglesu commented May 29, 2024

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

@iglesu iglesu added the bug Something isn't working label May 29, 2024
@iglesu iglesu self-assigned this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant