ci: merge version check into plugin-checks, share packaging as a composite action
- one PR workflow (plugin-checks) with version-changelog, package, phpunit jobs - .gitea/actions/package: package + validate + assert, used by PR and release - phpunit: FORCE_INSTALL so the TestBootstrapper installs its own test DB - protect-main.sh: required context is now plugin-checks / version-changelog Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
37aba5d2f0
commit
233f3eb17f
5 files changed
+80
-80
No files matched your search
@@ -63,32 +63,16 @@ jobs:
|
||||
path: .build/package.zip
|
||||
key: plugin-zip-${{ steps.tree.outputs.hash }}
|
||||
|
||||
- uses: actions/cache@v4
|
||||
if: steps.meta.outputs.skip == 'false' && steps.prebuilt.outputs.cache-hit != '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 (only if the tested zip is not available)
|
||||
if: steps.meta.outputs.skip == 'false' && steps.prebuilt.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
shopware-cli extension package . --output-directory .build --filename package.zip --git-commit "$GITHUB_SHA"
|
||||
|
||||
- name: Name the zip
|
||||
if: steps.meta.outputs.skip == 'false'
|
||||
- name: Name the prebuilt zip
|
||||
if: steps.meta.outputs.skip == 'false' && steps.prebuilt.outputs.cache-hit == 'true'
|
||||
run: mv .build/package.zip ".build/${{ steps.meta.outputs.zip }}"
|
||||
|
||||
# Cheap, and guards against a bad cache entry: always validate what ships.
|
||||
- name: Validate packaged zip
|
||||
# Packages only on a cache miss; always validates and asserts what ships (guards a bad cache entry).
|
||||
- uses: ./.gitea/actions/package
|
||||
if: steps.meta.outputs.skip == 'false'
|
||||
run: shopware-cli extension validate ".build/${{ steps.meta.outputs.zip }}"
|
||||
|
||||
- name: Assert built JS is in the zip
|
||||
if: steps.meta.outputs.skip == 'false'
|
||||
run: scripts/ci/assert-built-assets.sh ".build/${{ steps.meta.outputs.zip }}"
|
||||
with:
|
||||
filename: ${{ steps.meta.outputs.zip }}
|
||||
build: ${{ steps.prebuilt.outputs.cache-hit != 'true' }}
|
||||
|
||||
- name: Extract changelog section
|
||||
if: steps.meta.outputs.skip == 'false'
|
||||
|
||||
Reference in new issue
Block a user