diff --git a/.cirrus.yml b/.cirrus.yml index 012a211..72a4ea2 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -23,7 +23,8 @@ cirrus_wheels_macos_arm64_task: # # CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* # CIBW_BUILD: cp310-* env: - PYPI_TOKEN: ENCRYPTED[3a78537243c7e38cd58853cc4caf77a2e6b2f3a06511952347677300620f6d61f650fd45142d02788b00492b5e6de49f] + PYPI_TOKEN_TEST: ENCRYPTED[3a78537243c7e38cd58853cc4caf77a2e6b2f3a06511952347677300620f6d61f650fd45142d02788b00492b5e6de49f] + PYPI_TOKEN: ENCRYPTED[b27e8f130f21bdd930757077153317e14140a0bac98261a4279e3107ce5c4d859b1f64e304aa52ecbc267727660d354b] CIBW_ARCHS: arm64 CIBW_ARCHS_MACOS: arm64 PATH: /opt/homebrew/opt/python@3.10/bin:$PATH @@ -56,27 +57,14 @@ cirrus_wheels_macos_arm64_task: upload_pypi_script: | #!/usr/bin/env bash echo ${CIRRUS_RELEASE} - # if [[ "${CIRRUS_RELEASE}" == "" ]]; then - # exit 0 - # fi - + echo $CIRRUS_TAG + echo ${CIRRUS_TAG} # deploy source distribution to PyPI using 'twine' python -m pip install twine - python -m twine upload --verbose --repository-url https://test.pypi.org/legacy/ --username __token__ --password ${PYPI_TOKEN} wheelhouse/* - -# this task was not correctly configured, see the docs for how to download wheels -# # Upload Wheels to PyPI -# upload_wheels_to_test_pypi_task: -# compute_engine_instance: -# image_project: cirrus-images -# image: family/docker-builder -# platform: linux -# env: -# PYPI_TOKEN: ENCRYPTED[3a78537243c7e38cd58853cc4caf77a2e6b2f3a06511952347677300620f6d61f650fd45142d02788b00492b5e6de49f] -# depends_on: -# - cirrus_wheels_macos_arm64_task # Ensure this task is completed -# script: -# - python -m pip install twine -# - python -m twine upload --verbose --repository-url https://test.pypi.org/legacy/ --username __token__ --password $PYPI_TOKEN wheelhouse/* - - + if [[ "${CIRRUS_RELEASE}" != "" ]]; then + python -m twine upload --verbose --repository-url https://test.pypi.org/legacy/ --username __token__ --password ${PYPI_TOKEN_TEST} wheelhouse/* + else + echo "would have uploaded" + # python -m twine upload --verbose --username __token__ --password ${PYPI_TOKEN_TEST} wheelhouse/* + fi + diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index f34cd72..8ec6be2 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -115,11 +115,12 @@ jobs: with: # packages-dir: wheelhouse/ password: ${{ secrets.TEST_PYPI_API_TOKEN }} + skip-existing: true repository-url: https://test.pypi.org/legacy/ - - name: Publish distribution 📦 to PyPI - if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@release/v1 - with: - # packages-dir: wheelhouse/ - password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file + # - name: Publish distribution 📦 to PyPI + # if: startsWith(github.ref, 'refs/tags') + # uses: pypa/gh-action-pypi-publish@release/v1 + # with: + # # packages-dir: wheelhouse/ + # password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file