From 2a73c3c970bd871b671f25e3f97ae89120ac8bbb Mon Sep 17 00:00:00 2001 From: Niall Byrne <9848926+niall-byrne@users.noreply.github.com> Date: Tue, 28 Feb 2023 11:50:21 -0500 Subject: [PATCH] ci(GITHUB): optional galaxy releases --- .../.github/workflows/release.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/{{cookiecutter.project_slug}}/.github/workflows/release.yml b/{{cookiecutter.project_slug}}/.github/workflows/release.yml index 500ef2af..88c1c23b 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/release.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/release.yml @@ -23,8 +23,25 @@ env: {% raw %} jobs: + _create_configuration: + + runs-on: ubuntu-latest + outputs: + publish_to_galaxy: ${{ steps.check_for_api_key.outputs.publish_to_galaxy }} + + steps: + - name: Create Configuration -- Set Publish to Galaxy as Output + id: check_for_api_key + run: | + [[ -n "${API_KEY}" ]] && PUBLISH_TO_GALAXY="true" || PUBLISH_TO_GALAXY="false" + echo "publish_to_galaxy=${PUBLISH_TO_GALAXY}" >> $GITHUB_OUTPUT + env: + API_KEY: ${{ secrets.GALAXY_API_KEY }} + publish_to_galaxy: + needs: [_create_configuration] + if: needs._create_configuration.outputs.publish_to_galaxy == 'true' runs-on: ubuntu-latest steps: