Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,8 @@ jobs:
shell: bash
env:
NODE_AUTH_TOKEN: ''
# npm logs every OIDC token-exchange failure at verbose, so at the default
# loglevel a missing or mismatched trusted publisher just surfaces as
# ENEEDAUTH with no reason attached.
NPM_CONFIG_LOGLEVEL: verbose

13 changes: 13 additions & 0 deletions scripts/publish-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,16 @@ for manifest in packages/*/package.json; do
done

echo "published $published package(s)"

# A run that publishes nothing is a failure, not a success. `lerna version` exits 0 when
# it declines to version (an EBEHIND warning on a stale checkout, for example), which
# leaves the manifests at their released versions and makes every package look already
# published. Without this the job goes green having shipped nothing.
if [ "$published" -eq 0 ]; then
echo "error: no packages were published." >&2
echo "The manifest versions above are already on the registry, so the Version step" >&2
echo "did not produce a new release. Check the Version step output rather than" >&2
echo "re-running this job: re-running a workflow checks out its original commit," >&2
echo "which still carries the pre-release versions." >&2
exit 1
fi
Loading