From 6226440bda671d2a09ada998ee4bac7ee50303c0 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Tue, 1 Nov 2022 19:18:50 +0000 Subject: [PATCH] =?UTF-8?q?Build/Test=20Tools:=20Don=E2=80=99t=20ZIP=20the?= =?UTF-8?q?me=20ZIP=20files.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When uploading artifacts during GitHub Action workflows, all files uploaded to an artifact name are zipped. When a ZIP file is uploaded, the result is a horrifying state of ZIP-ception. This changes the workflow to upload all of the needed theme files to the artifact instead of a singular ZIP file created prior to uploading. This also fixes a bug where ZIP files generated have the desired theme nested within `src/wp-content/themes` instead of just containing the theme files. Props ndiego, wildworks, desrosj, bgardner, colorful-tones. Fixes #56898. git-svn-id: https://develop.svn.wordpress.org/trunk@54740 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/test-and-zip-default-themes.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-and-zip-default-themes.yml b/.github/workflows/test-and-zip-default-themes.yml index e56c999fc5..9c6cb3a6da 100644 --- a/.github/workflows/test-and-zip-default-themes.yml +++ b/.github/workflows/test-and-zip-default-themes.yml @@ -97,8 +97,7 @@ jobs: # # Performs the following steps: # - Checks out the repository. - # - Creates a ZIP file of the theme for wordpress.org. - # - Uploads the ZIP file as a workflow artifact. + # - Uploads the theme files as a workflow artifact (files uploaded as an artifact are automatically zipped). bundle-theme: name: Create ${{ matrix.theme }} ZIP file runs-on: ubuntu-latest @@ -130,14 +129,12 @@ jobs: with: ref: ${{ github.event_name == 'workflow_dispatch' && inputs.branch || github.ref }} - - name: Create theme ZIP file - run: zip -r ${{ matrix.theme }}.zip src/wp-content/themes/${{ matrix.theme }} -x "*/node_modules/*" - - name: Upload theme ZIP as an artifact uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1 with: + if-no-files-found: error name: ${{ matrix.theme }} - path: ${{ matrix.theme }}.zip + path: src/wp-content/themes/${{ matrix.theme }} slack-notifications: name: Slack Notifications