add conditions to check for Repo and Secret

This commit is contained in:
mauwii 2023-02-04 23:22:23 +01:00
parent 0197459b02
commit 93623a4449
No known key found for this signature in database
GPG Key ID: D923DB04ADB3F5AB

View File

@ -13,6 +13,7 @@ jobs:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
TWINE_NON_INTERACTIVE: 1
if: github.repository == "invoke-ai/InvokeAI"
steps:
- name: checkout sources
uses: actions/checkout@v3
@ -36,5 +37,5 @@ jobs:
print(f'PACKAGE_EXISTS={EXISTS}')" >> $GITHUB_ENV
- name: upload package
if: env.PACKAGE_EXISTS == 'False'
if: env.PACKAGE_EXISTS == 'False' && env.TWINE_PASSWORD != ""
run: twine upload dist/*