Skip to content
Open
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
9 changes: 9 additions & 0 deletions .github/workflows/publish-npm-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ jobs:
# On non-trunk branches, --no-push avoids pushing the version
# bump commit back to the branch. The published packages still
# get the version bump in their package.json on npm.
#
# NX_TUI=false disables Nx's terminal UI mode, which otherwise
# buffers all task output until the run ends. lerna runs the
# build via the prepublishOnly lifecycle script; without this,
# if the build crashes mid-run (e.g. an OOM kill), the entire
# buffer is lost and the only signal in the log is
# "lifecycle 'prepublishOnly' errored" with no diagnostics.
env:
NX_TUI: 'false'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The build diagnostics are still likely to be hidden here. The failing build runs through prepublishOnly, and Lerna runs package lifecycle scripts with piped stdio. When that lifecycle script exits non-zero, Lerna reports the lifecycle failure but does not reliably stream or print the failed script's captured output.

NX_TUI=false only changes how Nx renders output once Nx is running, and Nx already disables the TUI in CI. It does not change Lerna's lifecycle stdio handling, which is the layer dropping the useful build output.

To make failed releases diagnosable, let's run the build in its own workflow step before lerna publish, or change the publish path so the lifecycle script inherits or prints stdio on failure.

run: >
lerna publish ${{ inputs.version_bump || 'patch' }}
--yes --no-private --loglevel=verbose
Expand Down
40 changes: 28 additions & 12 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,35 @@ on:

jobs:
release:
# Only run this workflow on the playground repo, from the trunk branch, and when triggered by a Playground maintainer
# Only run this workflow on the playground repo. For workflow_run triggers,
# require the parent workflow to have succeeded on trunk so we don't update
# the changelog (and cascade-trigger the GitHub Release workflow) when an
# npm publish actually failed or ran on a non-trunk branch. Note: for
# workflow_run events, github.ref is always the default branch where this
# file lives, so we must use workflow_run.head_branch to gate on the
# parent's actual branch. For workflow_dispatch, restrict to Playground
# maintainers running on trunk.
if: >
github.repository == 'WordPress/wordpress-playground' &&
github.ref == 'refs/heads/trunk' && (
github.event.workflow_run.conclusion == 'success' ||
github.actor == 'adamziel' ||
github.actor == 'dmsnell' ||
github.actor == 'bgrgicak' ||
github.actor == 'brandonpayton' ||
github.actor == 'zaerl' ||
github.actor == 'janjakes' ||
github.actor == 'mho22' ||
github.actor == 'ashfame'
github.repository == 'WordPress/wordpress-playground' && (
(
github.event_name == 'workflow_run' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'trunk'
) ||
(
github.event_name == 'workflow_dispatch' &&
github.ref == 'refs/heads/trunk' &&
(
github.actor == 'adamziel' ||
github.actor == 'dmsnell' ||
github.actor == 'bgrgicak' ||
github.actor == 'brandonpayton' ||
github.actor == 'zaerl' ||
github.actor == 'janjakes' ||
github.actor == 'mho22' ||
github.actor == 'ashfame'
)
)
)

# Specify runner + deployment step
Expand Down
Loading