Simplify decomposition of controlled eigengates with global phase (#7… #650
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-release cirq to PyPi | |
on: | |
push: | |
branches: | |
- main | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
push_to_pypi: | |
if: github.repository == 'quantumlib/Cirq' | |
name: Push to PyPi | |
runs-on: ubuntu-22.04 | |
env: | |
NAME: dev-release | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | |
with: | |
python-version: '3.11' | |
architecture: 'x64' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade setuptools wheel twine | |
- name: Create PYPI config file | |
env: | |
CIRQ_PYPI_TOKEN: ${{ secrets.CIRQ_PYPI_TOKEN }} | |
CIRQ_TEST_PYPI_TOKEN: ${{ secrets.CIRQ_TEST_PYPI_TOKEN }} | |
run: | | |
envsubst < dev_tools/packaging/pypirc_template > $HOME/.pypirc | |
- name: Build and publish | |
run: | | |
export CIRQ_PRE_RELEASE_VERSION=$(dev_tools/packaging/generate-dev-version-id.sh) | |
[[ "$CIRQ_PRE_RELEASE_VERSION" =~ .*dev.* ]] && echo "Deploying dev version '$CIRQ_PRE_RELEASE_VERSION'" || (echo "not dev version"; exit 1) | |
out_dir="${PWD}/dist" | |
dev_tools/packaging/produce-package.sh ${out_dir} $CIRQ_PRE_RELEASE_VERSION | |
twine upload "${out_dir}/*" |