File tree 2 files changed +19
-3
lines changed
2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,13 @@ jobs:
21
21
run : |
22
22
python -m pip install --upgrade pip
23
23
pip install setuptools wheel twine
24
- - name : Build and publish
24
+ - name : Create PYPI config file
25
25
env :
26
- TWINE_USERNAME : ${{ secrets.PYPI_USER }}
27
- TWINE_PASSWORD : ${{ secrets.PYPI_PASS }}
26
+ CIRQ_PYPI_TOKEN : ${{ secrets.CIRQ_PYPI_TOKEN }}
27
+ CIRQ_TEST_PYPI_TOKEN : ${{ secrets.CIRQ_TEST_PYPI_TOKEN }}
28
+ run : |
29
+ dev_tools/packaging/create_pypirc.sh
30
+ - name : Build and publish
28
31
run : |
29
32
export CIRQ_PRE_RELEASE_VERSION=$(dev_tools/packaging/generate-dev-version-id.sh)
30
33
[[ "$CIRQ_PRE_RELEASE_VERSION" =~ .*dev.* ]] && echo "Deploying dev version '$CIRQ_PRE_RELEASE_VERSION'" || (echo "not dev version"; exit 1)
Original file line number Diff line number Diff line change
1
+ #! bin/bash
2
+
3
+ # Create default pypi config file with token authentication.
4
+ # refrence: https://packaging.python.org/en/latest/specifications/pypirc/#common-configurations
5
+ echo " " "
6
+ [pypi]
7
+ username = __token__
8
+ password = ${CIRQ_PYPI_TOKEN}
9
+
10
+ [testpypi]
11
+ username = __token__
12
+ password = ${CIRQ_TEST_PYPI_TOKEN}
13
+ " " " >> $HOME /.pypirc
You can’t perform that action at this time.
0 commit comments