From fa59ec2acea4e5e0eb3ac9630a8cf34c39966cc4 Mon Sep 17 00:00:00 2001 From: Luis Fabregas Date: Mon, 8 Aug 2022 09:49:05 -0700 Subject: [PATCH 1/2] fix PyPI build and upload workflow according to official Python docs --- .github/workflows/package_upload.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/package_upload.yml b/.github/workflows/package_upload.yml index 3d1bbe21..6b74adec 100644 --- a/.github/workflows/package_upload.yml +++ b/.github/workflows/package_upload.yml @@ -11,19 +11,16 @@ jobs: steps: - name: Checkout uses: actions/checkout@v1 - - name: Set up Python 3.8 + - name: Set up Python 3.10 uses: actions/setup-python@v1 with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install setuptools --user - python -m pip install build --user - python -m pip install twine --user - - name: Build distribution - run: | - python setup.py sdist - ./setup.py bdist_wheel --user + python-version: "3.10" + - name: Install pypa/build + run: >- + python -m pip install build --user + - name: Build a binary wheel and a source tarball + run: >- + python -m build --sdist --wheel --outdir dist/ - name: Publish distribution to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: From d2d8eb92a94113d1c09404182620ae3a72f71fb7 Mon Sep 17 00:00:00 2001 From: Luis Fabregas Date: Mon, 8 Aug 2022 10:12:51 -0700 Subject: [PATCH 2/2] fix GHA for conda build and upload --- .github/actions/conda_build_publish_package/entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/conda_build_publish_package/entrypoint.sh b/.github/actions/conda_build_publish_package/entrypoint.sh index c45b9c86..309b2045 100644 --- a/.github/actions/conda_build_publish_package/entrypoint.sh +++ b/.github/actions/conda_build_publish_package/entrypoint.sh @@ -26,7 +26,7 @@ build_package(){ done for platform in "${PLATFORMS[@]}"; do for filename in /$platform/*.tar.bz2; do - conda convert -p $platform linux-64/*.tar.bz2 + conda convert /$platform/$filename -p $platform linux-64/*.tar.bz2 -o . done done } @@ -38,7 +38,7 @@ upload_package(){ export ANACONDA_API_TOKEN=$INPUT_ANACONDATOKEN for platform in "${PLATFORMS[@]}"; do - for filename in ./"$platform"/*.tar.bz2; do + for filename in ./$platform/*.tar.bz2; do anaconda upload $filename done done