Skip to content
Merged
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
15 changes: 14 additions & 1 deletion .github/workflows/zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,24 @@ jobs:
echo "exists=false" >> $GITHUB_OUTPUT
fi

# ------------------------------------------------------------------------------
# Ensures actions/setup-node works as-expected in scenarios where a npm lockfile
# doesn't exist, such as when only bun is used.
# ------------------------------------------------------------------------------
- name: Check for npm lockfile
id: check-lockfile
run: |
if [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ] || [ -f yarn.lock ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
Comment thread
d4mation marked this conversation as resolved.

- uses: actions/setup-node@v4
if: steps.check-nvmrc.outputs.exists == 'true'
with:
node-version-file: '.nvmrc'
cache: 'npm'
cache: ${{ steps.check-lockfile.outputs.exists == 'true' && 'npm' || '' }}

- name: Set up authentication for NODE_AUTH_TOKEN if present
run: |
Expand Down