Skip to content

Commit

Permalink
add condition for cirrus ci"
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Anibal committed Dec 12, 2023
1 parent 21cbfe4 commit 17eab5f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 29 deletions.
34 changes: 11 additions & 23 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]/bin:$PATH
Expand Down Expand Up @@ -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
13 changes: 7 additions & 6 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
# - 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 }}

0 comments on commit 17eab5f

Please sign in to comment.