Make WordPress Core


Ignore:
Timestamp:
11/01/2022 07:18:50 PM (2 years ago)
Author:
desrosj
Message:

Build/Test Tools: Don’t ZIP theme ZIP files.

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/test-and-zip-default-themes.yml

    r54699 r54740  
    9898  # Performs the following steps:
    9999  # - Checks out the repository.
    100   # - Creates a ZIP file of the theme for wordpress.org.
    101   # - Uploads the ZIP file as a workflow artifact.
     100  # - Uploads the theme files as a workflow artifact (files uploaded as an artifact are automatically zipped).
    102101  bundle-theme:
    103102    name: Create ${{ matrix.theme }} ZIP file
     
    131130          ref: ${{ github.event_name == 'workflow_dispatch' && inputs.branch || github.ref }}
    132131
    133       - name: Create theme ZIP file
    134         run: zip -r ${{ matrix.theme }}.zip src/wp-content/themes/${{ matrix.theme }} -x "*/node_modules/*"
    135 
    136132      - name: Upload theme ZIP as an artifact
    137133        uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1
    138134        with:
     135          if-no-files-found: error
    139136          name: ${{ matrix.theme }}
    140           path: ${{ matrix.theme }}.zip
     137          path: src/wp-content/themes/${{ matrix.theme }}
    141138
    142139  slack-notifications:
Note: See TracChangeset for help on using the changeset viewer.