Two bugs in `.github/workflows/announce-discussion.yml` surfaced when
v1.3.1 published:
1. `DEPLOY_URL: unbound variable` when triggered by `release` event.
`${{ github.event.workflow_run.* }}` evaluates to null on a release
event, and the resulting env-var assignment leaves the variable
unset (not empty), which `set -u` then trips on. Guard every
dynamic value with `|| ''` so each env var is always at least an
empty string.
2. Body strings used `$'...'` ANSI-C quoting (which expands backslash
escapes but NOT variables), so the discussion body would have
contained literal `$RELEASE_TAG` text. Rewrite to plain double-quoted
strings, using `$'\n'` only for embedded newlines.
Also pass dynamic values (REPO_ID / CAT_ID / TITLE / BODY) into the
Create Discussion step through env vars instead of literal `${{ ... }}`
substitution — protects against titles/bodies containing quotes or
other shell-special characters that would otherwise break the command
line.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>