From 1947dc55d57f262b5cddfea6d1839608a2786aeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CJamesHenry=E2=80=9D?= Date: Fri, 1 Mar 2024 15:01:17 +0400 Subject: [PATCH] chore(repo): fix bash logic add comments --- .github/workflows/publish.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6246b212f18591..21014f029c452f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -267,13 +267,16 @@ jobs: # Otherwise, use the tag name (if triggered via release), or explicit version (if triggered via workflow_dispatch) VERSION="${GITHUB_REF_NAME}" fi - # If triggered via workflow_dispatch, perform a dry-run + # If triggered via workflow_dispatch, we are either performing a dry-run on the current branch, or creating a PR-release for the given PR number if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + # If the PR number is set, pass in a special version format which the nx-release.ts script will recognize (pr-) if [ -n "${{ github.event.inputs.pr }}" ]; then - DRY_RUN="--dry-run" - else DRY_RUN="" VERSION="pr-${{ github.event.inputs.pr }}" + else + # Otherwise, perform a dry-run on the current branch + DRY_RUN="--dry-run" + VERSION="0.0.0-dry-run.0" fi else DRY_RUN=""