Files
plugins/scripts
chrnx d5e8c8a827
CI / dco (pull_request) Successful in 4s
CI / build (pull_request) Successful in 14s
CI / runtimes (bun) (pull_request) Successful in 9s
CI / runtimes (edge) (pull_request) Successful in 7s
CI / runtimes (deno) (pull_request) Successful in 12s
fix(ci): stop a failed publish from reporting as a successful release
Two bugs in one line, both silent, both found in review before anything shipped.

**The pipe swallowed the exit status.** `deno publish | tee` reports the status
of the last command in the pipeline, and that is `tee`, which always succeeds.
GitHub's default shell is `bash -e` *without* `pipefail`, so a failed publish
would have been a green step — and the workflow would have gone on to cut a
GitHub release for it. Demonstrated rather than assumed:

    bash -e   -c 'false | tee /dev/null'  -> exit 0
    bash -eo pipefail -c 'false | tee /dev/null'  -> exit 1

Naming `shell: bash` gets `-eo pipefail`.

**And the log was going to be empty anyway.** deno's logger is env_logger,
whose default target is stderr, so the `Successfully published` lines never
reach stdout. Measured against a real `deno publish`: 0 lines on stdout, all of
them on stderr. So `--notes` would have found nothing and announced that nothing
shipped, on every successful release. `2>&1` fixes it.

The second bug is the reason for the third change: `--notes` now refuses a log
carrying neither marker instead of reporting it as "nothing was published". A log
this script cannot read and a release where nothing shipped are indistinguishable
from the text, and guessing wrong is silent in the direction that matters. Now it
fails and says to check the redirect and the pipeline.

Verified all three paths: an empty log exits 1, an all-skipped log renders the
"already on JSR" line and exits 0, and a real publish log renders per-package
sections.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-23 12:34:30 -05:00
..