fix: reorder Setup Node before pnpm setup in plugin-release workflow (#83)
Corepack requires Node to be set up first. The release job was failing with 'corepack: command not found' because Setup pnpm (Corepack) ran before Setup Node. This aligns plugin-release.yaml with plugin-ci.yaml step ordering. Fixes PRI-21 Co-authored-by: Pawla Abdul (Bot) <pawla@groombook.dev>
This commit is contained in:
committed by
GitHub
parent
07c4b881f3
commit
d5645f2e4c
@@ -115,6 +115,14 @@ jobs:
|
||||
echo "has_package_manager=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
# Only enable built-in npm caching here; pnpm caching is handled below
|
||||
# after pnpm is installed (corepack is not available before setup-node).
|
||||
cache: ${{ steps.pkg-manager.outputs.manager == 'npm' && 'npm' || '' }}
|
||||
|
||||
- name: Setup pnpm (via Corepack, reads version from packageManager field)
|
||||
if: steps.pkg-manager.outputs.manager == 'pnpm' && steps.pkg-manager.outputs.has_package_manager == 'true'
|
||||
run: |
|
||||
@@ -129,11 +137,19 @@ jobs:
|
||||
run_install: false
|
||||
version: latest
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v6
|
||||
- name: Get pnpm store directory
|
||||
id: pnpm-store
|
||||
if: steps.pkg-manager.outputs.manager == 'pnpm'
|
||||
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache pnpm store
|
||||
if: steps.pkg-manager.outputs.manager == 'pnpm'
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
cache: ${{ steps.pkg-manager.outputs.manager }}
|
||||
path: ${{ steps.pnpm-store.outputs.dir }}
|
||||
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user