From be491e2e615c79d59d3151c1f524514f20c4876d Mon Sep 17 00:00:00 2001 From: zieladam Date: Fri, 8 Dec 2023 16:05:31 +0000 Subject: [PATCH] Build/Test Tools: Zip WordPress files before npm run clean Fixes a problem in WordPress artifact upload pipeline. The callable-test-core-build-process.yml used to zip the WordPress dist directory after npm run grunt clean runs, producing an empty zip file. This commit moves the zip before the cleanup task. Follow up to [57124]. Props ockham, dmsnell. See #59416. git-svn-id: https://develop.svn.wordpress.org/trunk@57174 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/callable-test-core-build-process.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/callable-test-core-build-process.yml b/.github/workflows/callable-test-core-build-process.yml index 4f97881bdd85d..60d97be95811e 100644 --- a/.github/workflows/callable-test-core-build-process.yml +++ b/.github/workflows/callable-test-core-build-process.yml @@ -68,16 +68,16 @@ jobs: - name: Ensure version-controlled files are not modified or deleted during building run: git diff --exit-code + - name: Create ZIP of built files + if: ${{ inputs.directory == 'build' && 'ubuntu-latest' == inputs.os }} + run: zip -r wordpress.zip build/. + - name: Clean after building to run from ${{ inputs.directory }} run: npm run grunt clean${{ inputs.directory == 'src' && ' -- --dev' || '' }} - name: Ensure version-controlled files are not modified or deleted during cleaning run: git diff --exit-code - - name: Create ZIP of built files - if: ${{ inputs.directory == 'build' && 'ubuntu-latest' == inputs.os }} - run: zip -r wordpress.zip build/. - - name: Upload ZIP as a GitHub Actions artifact uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 if: ${{ inputs.directory == 'build' && 'ubuntu-latest' == inputs.os }}