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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Setup Node.js 22.x
- name: Setup Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: 22.x
node-version: '>=24.18.0 <25'
cache: yarn

- name: Install dependencies
Expand All @@ -70,6 +70,10 @@ jobs:
- name: 🏗 Run build script
run: yarn build

- name: Enable npm staged publishing
run: |
echo "$GITHUB_WORKSPACE/scripts/wrap-staged" >> "$GITHUB_PATH"
- name: 🚀 Release
uses: cycjimmy/semantic-release-action@v4
with:
Expand Down
19 changes: 19 additions & 0 deletions scripts/wrap-staged/npm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Route publishing through npm's staging queue; forward other commands unchanged.
set -euo pipefail

# execa may prepend local bin directories before this wrapper's PATH entry.
wrapper_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
remaining_path=":$PATH:"
while [[ "$remaining_path" == *":$wrapper_dir:"* ]]; do
remaining_path="${remaining_path//":$wrapper_dir:"/:}"
done
remaining_path="${remaining_path#:}"
export PATH="${remaining_path%:}"

if [[ "${1:-}" == "publish" ]]; then
shift
exec npm stage publish "$@"
fi

exec npm "$@"
Loading