Skip to content

Commit

Permalink
chore(repo): fix bash logic add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry authored and mandarini committed Mar 1, 2024
1 parent 6cec283 commit 1947dc5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-<pr_number>)
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=""
Expand Down

0 comments on commit 1947dc5

Please sign in to comment.