Skip to content

Commit

Permalink
Build/Test Tools: Zip WordPress files before npm run clean
Browse files Browse the repository at this point in the history
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
  • Loading branch information
adamziel committed Dec 8, 2023
1 parent e1265a3 commit be491e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/callable-test-core-build-process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit be491e2

Please sign in to comment.