name: package-extension description: >- Package the Shopware extension with shopware-cli (builds admin/storefront assets), validate the zip and assert it contains the built JS. Shared by the PR checks and the release workflow. Must run in the ghcr.io/shopware/shopware-cli image, after actions/checkout. inputs: filename: description: Name of the zip written to .build/ default: package.zip build: description: "'false' skips packaging (a prebuilt zip is already in .build/) and only validates it" default: 'true' runs: using: composite steps: - uses: actions/cache@v4 if: inputs.build == 'true' with: path: | ~/.npm ~/.cache/shopware-cli key: swcli-${{ runner.os }}-${{ hashFiles('composer.json', 'src/Resources/app/**/package*.json') }} restore-keys: swcli-${{ runner.os }}- - name: Package extension if: inputs.build == 'true' shell: bash run: shopware-cli extension package . --output-directory .build --filename "${{ inputs.filename }}" --git-commit "$GITHUB_SHA" - name: Validate packaged zip shell: bash run: shopware-cli extension validate ".build/${{ inputs.filename }}" - name: Assert built JS is in the zip shell: bash run: scripts/ci/assert-built-assets.sh ".build/${{ inputs.filename }}"