From 6c925e7d4dbc2bb1181201371ac878d5df9c8dc9 Mon Sep 17 00:00:00 2001 From: David Stone Date: Mon, 6 Apr 2026 20:45:32 -0600 Subject: [PATCH] =?UTF-8?q?fix(release):=20fix=20SVN=20deploy=20=E2=80=94?= =?UTF-8?q?=20download=20artifact=20instead=20of=20rebuilding=20with=20--n?= =?UTF-8?q?o-dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The deploy-to-wporg job was running composer install --no-dev then npm run build, which triggers the prebuild script that calls wp-cli via vendor/wp-cli/wp-cli/bin/wp. Since wp-cli/wp-cli-bundle is a dev dependency, it was absent and the build failed. Fix: upload the zip as a GitHub Actions artifact in the build job, then download and unzip it in deploy-to-wporg — no rebuild needed. Matches the pattern used in the ai-provider-for-any-compatible-endpoint deploy workflow. Also bumps Node.js from 18 to 20 in the build job; several packages already require node>=20 and were emitting EBADENGINE warnings. --- .github/workflows/release.yml | 41 ++++++++++++++++------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c53427c7..d7a61c71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: - node-version: '18' + node-version: '20' cache: 'npm' - name: Install PHP dependencies @@ -89,6 +89,13 @@ jobs: mkdir -p build mv ultimate-multisite.zip build/ultimate-multisite-${{ env.VERSION }}.zip + - name: Upload build artifact + uses: actions/upload-artifact@v4 + with: + name: ultimate-multisite-zip + path: build/ultimate-multisite-${{ env.VERSION }}.zip + retention-days: 7 + - name: Create Release id: create_release uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 @@ -130,30 +137,20 @@ jobs: with: fetch-depth: 0 - - name: Setup PHP - uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2 - with: - php-version: '7.4' - extensions: mbstring, intl, curl - tools: composer, wp-cli + - name: Get the version + run: | + VERSION="${GITHUB_REF#refs/tags/v}" + echo "VERSION=$VERSION" >> $GITHUB_ENV - - name: Set up Node.js - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + - name: Download build artifact + uses: actions/download-artifact@v4 with: - node-version: '18' - cache: 'npm' - - - name: Install PHP dependencies - run: composer install --no-dev --optimize-autoloader - - - name: Install Node dependencies - run: npm ci + name: ultimate-multisite-zip + path: build/ - - name: Build plugin - run: npm run build - env: - MU_CLIENT_ID: ${{ secrets.MU_CLIENT_ID }} - MU_CLIENT_SECRET: ${{ secrets.MU_CLIENT_SECRET }} + - name: Unzip build artifact into workspace + run: | + unzip -o build/ultimate-multisite-${{ env.VERSION }}.zip -d . - name: Deploy to WordPress.org SVN uses: 10up/action-wordpress-plugin-deploy@stable