Skip to content

Commit d84fb2c

Browse files
add a pypi config file
1 parent ad37cc0 commit d84fb2c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Diff for: .github/workflows/release-main.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,13 @@ jobs:
2121
run: |
2222
python -m pip install --upgrade pip
2323
pip install setuptools wheel twine
24+
- name: Create PYPI config file
25+
run: |
26+
dev_tools/packaging/create_pypirc.sh
2427
- name: Build and publish
2528
run: |
2629
export CIRQ_PRE_RELEASE_VERSION=$(dev_tools/packaging/generate-dev-version-id.sh)
2730
[[ "$CIRQ_PRE_RELEASE_VERSION" =~ .*dev.* ]] && echo "Deploying dev version '$CIRQ_PRE_RELEASE_VERSION'" || (echo "not dev version"; exit 1)
2831
out_dir="${PWD}/dist"
2932
dev_tools/packaging/produce-package.sh ${out_dir} $CIRQ_PRE_RELEASE_VERSION
30-
twine upload "${out_dir}/*" -u __token__ -p ${{ secrets.CIRQ_PYPI_TOKEN }}
33+
twine upload "${out_dir}/*"

Diff for: dev_tools/packaging/create_pypirc.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
echo """
2+
[pypi]
3+
username = __token__
4+
password = ${{ secrets.CIRQ_PYPI_TOKEN }}
5+
6+
[testpypi]
7+
username = __token__
8+
password = ${{ secrets.CIRQ_TEST_PYPI_TOKEN }}
9+
""" >> $HOME/.pypirc

0 commit comments

Comments
 (0)