From 5a6c24b20a510e58dae7cdfed9563e698de688c5 Mon Sep 17 00:00:00 2001 From: Conchylicultor Date: Tue, 31 May 2022 14:00:16 +0200 Subject: [PATCH] Error if user forgot to set pypi secret --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 923a581..78452d1 100644 --- a/action.yml +++ b/action.yml @@ -9,6 +9,7 @@ inputs: pypi-token: description: 'Token of the PyPI account publishing the project. If missing, PyPI release is skipped.' required: false + default: 'skip' # Use sentinel value to error if user forgot to set the GitHub secret gh-token: description: 'Github action token. If missing, GitHub release is skipped.' required: false @@ -53,7 +54,7 @@ runs: # Publish the package (if local `__version__` < pip version) - if: | - inputs.pypi-token + inputs.pypi-token != 'skip' && steps.compare-version.outputs.should-release == 'true' uses: etils-actions/pypi-build-publish@v1 with: