Skip to content

Commit d2c3793

Browse files
Pypi publish: PYPI_TEST_API_TOKEN not required (#116)
1 parent 08cd93f commit d2c3793

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/python_package_index_publish.yaml

+9-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ on:
3636
type: boolean
3737
secrets:
3838
PYPI_TEST_API_TOKEN:
39-
required: true
39+
required: false
4040
PYPI_PROD_API_TOKEN:
4141
required: true
4242
jobs:
@@ -66,13 +66,19 @@ jobs:
6666
poetry show -vv
6767
shell: bash
6868

69-
- name: Configure PyPI Repos in Poetry and Poetry Build
69+
- name: Configure Test PyPI Repo
70+
if: ${{ inputs.DO_TEST_PUBLISH_FIRST }}
7071
env:
7172
PYPI_TEST_API_TOKEN: ${{ secrets.PYPI_TEST_API_TOKEN }}
73+
run: |
74+
poetry config pypi-token.testpypi $PYPI_TEST_API_TOKEN
75+
shell: bash
76+
77+
- name: Configure Prod PyPI Repo and Poetry Build
78+
env:
7279
PYPI_PROD_API_TOKEN: ${{ secrets.PYPI_PROD_API_TOKEN }}
7380
run: |
7481
poetry config repositories.testpypi https://test.pypi.org/legacy/
75-
poetry config pypi-token.testpypi $PYPI_TEST_API_TOKEN
7682
poetry config pypi-token.pypi $PYPI_PROD_API_TOKEN
7783
poetry build
7884
shell: bash

0 commit comments

Comments
 (0)