feat: align plugin and pipeline with Shopware guidelines #13

Merged
haylan merged 13 commits from ci/shopware-guideline-compliance into main 2026-10-03 22:46:18 +00:00
2 changed files with 17 additions and 30 deletions
Showing only changes of commit c3b242675e - Show all commits

No files matched your search

+9 -17
View File
@@ -1,7 +1,7 @@
name: plugin-checks name: plugin-checks
# Plugin-agnostic: nothing below names this plugin. Name, version and paths come from composer.json. # Plugin-agnostic: nothing below names this plugin. Name, version and paths come from composer.json.
# shopware-cli is intentionally unpinned (latest); a red build after a CLI release means fix the config. # shopware-cli runs from its official Docker image, intentionally unpinned (latest); a red build after a CLI release means fix the config.
on: on:
pull_request: pull_request:
@@ -13,37 +13,29 @@ permissions:
jobs: jobs:
validate: validate:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: ghcr.io/shopware/shopware-cli:latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install shopware-cli
run: |
curl -fsSL --retry 5 --retry-delay 10 -o /tmp/swcli.tgz https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz
tar -xzf /tmp/swcli.tgz -C /tmp shopware-cli
sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli
- name: Validate extension - name: Validate extension
run: shopware-cli extension validate . run: shopware-cli extension validate .
package: package:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: ghcr.io/shopware/shopware-cli:latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install shopware-cli
run: |
curl -fsSL --retry 5 --retry-delay 10 -o /tmp/swcli.tgz https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz
tar -xzf /tmp/swcli.tgz -C /tmp shopware-cli
sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli
- name: Package extension - name: Package extension
run: shopware-cli extension package . --output-directory .build --filename package.zip --git-commit "$GITHUB_SHA" run: shopware-cli extension package . --output-directory .build --filename package.zip --git-commit "$GITHUB_SHA"
- name: Validate packaged zip - name: Validate packaged zip
run: shopware-cli extension validate .build/package.zip run: shopware-cli extension validate .build/package.zip
- name: Ensure helper tools (jq, curl, unzip)
run: |
command -v jq >/dev/null && command -v curl >/dev/null && command -v unzip >/dev/null && exit 0
(apt-get update -q && apt-get install -y -q --no-install-recommends jq curl unzip) || apk add --no-cache jq curl unzip
- name: Assert built JS is in the zip - name: Assert built JS is in the zip
run: | run: |
set -e set -e
+8 -13
View File
@@ -1,7 +1,7 @@
name: release name: release
# Plugin-agnostic: owner, repo, host, package name and version come from the `github` context # Plugin-agnostic: owner, repo, host, package name and version come from the `github` context
# and composer.json. shopware-cli is intentionally unpinned (latest). # and composer.json. shopware-cli runs from its official Docker image, intentionally unpinned (latest).
# RELEASE_TOKEN is the single token used for releases, assets and the Composer registry. # RELEASE_TOKEN is the single token used for releases, assets and the Composer registry.
on: on:
@@ -15,7 +15,14 @@ permissions:
jobs: jobs:
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: ghcr.io/shopware/shopware-cli:latest
steps: steps:
- name: Ensure helper tools (jq, curl, unzip, git)
run: |
command -v jq >/dev/null && command -v curl >/dev/null && command -v unzip >/dev/null && command -v git >/dev/null && exit 0
(apt-get update -q && apt-get install -y -q --no-install-recommends jq curl unzip git) || apk add --no-cache jq curl unzip git
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
@@ -42,18 +49,6 @@ jobs:
echo "skip=false" >> "$GITHUB_OUTPUT" echo "skip=false" >> "$GITHUB_OUTPUT"
fi fi
- uses: actions/setup-node@v4
if: steps.meta.outputs.skip == 'false'
with:
node-version: '20'
- name: Install shopware-cli
if: steps.meta.outputs.skip == 'false'
run: |
curl -fsSL --retry 5 --retry-delay 10 -o /tmp/swcli.tgz https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz
tar -xzf /tmp/swcli.tgz -C /tmp shopware-cli
sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli
- name: Validate extension - name: Validate extension
if: steps.meta.outputs.skip == 'false' if: steps.meta.outputs.skip == 'false'
run: shopware-cli extension validate . run: shopware-cli extension validate .