fix(release): repack zip root-level for the Composer registry #14

Merged
haylan merged 10 commits from fix/release-registry-zip into main 2026-10-03 23:21:08 +00:00
4 changed files with 26 additions and 29 deletions
Showing only changes of commit bfb88a25b8 - Show all commits

No files matched your search

+13 -15
View File
@@ -22,26 +22,24 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check version bump and changelog entry # The version must be higher than the latest *published release* (not just higher than main), so main can
# carry a version whose release failed or was withdrawn without blocking the next PR.
- name: Check version is unreleased and changelog entry exists
env:
TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: | run: |
set -e set -e
PR_VERSION=$(grep -m1 '"version"' composer.json | sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/') PR_VERSION=$(grep -m1 '"version"' composer.json | sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/')
MAIN_VERSION=$(git show origin/main:composer.json | grep -m1 '"version"' | sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/') LATEST=$(curl -sf -H "Authorization: token ${TOKEN}" "${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}/releases?limit=100" \
| jq -r '.[].tag_name' | sed 's/^v//' | sort -V | tail -n1)
LATEST="${LATEST:-0.0.0}"
echo "main version: $MAIN_VERSION" echo "latest release: $LATEST"
echo "PR version: $PR_VERSION" echo "PR version: $PR_VERSION"
if [ "$MAIN_VERSION" = "$PR_VERSION" ]; then if [ "$PR_VERSION" = "$LATEST" ] || [ "$(printf '%s\n%s\n' "$LATEST" "$PR_VERSION" | sort -V | tail -n1)" != "$PR_VERSION" ]; then
echo "::error::composer.json version ($PR_VERSION) was not bumped from main ($MAIN_VERSION)" echo "::error::composer.json version ($PR_VERSION) is not greater than the latest release ($LATEST)"
exit 1
fi
HIGHEST=$(printf '%s\n%s\n' "$MAIN_VERSION" "$PR_VERSION" | sort -V | tail -n1)
if [ "$HIGHEST" != "$PR_VERSION" ]; then
echo "::error::composer.json version ($PR_VERSION) is not greater than main's ($MAIN_VERSION)"
exit 1 exit 1
fi fi
@@ -50,7 +48,7 @@ jobs:
exit 1 exit 1
fi fi
echo "OK: version bumped to $PR_VERSION and documented in CHANGELOG.md" echo "OK: $PR_VERSION is unreleased and documented in CHANGELOG.md"
# Packages the extension (builds admin/storefront assets) and validates the resulting zip, # Packages the extension (builds admin/storefront assets) and validates the resulting zip,
# which is the artifact that ships. A separate directory validate would only repeat these checks. # which is the artifact that ships. A separate directory validate would only repeat these checks.
+9 -11
View File
@@ -7,27 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
## [0.1.1] - 2026-10-04 ## [0.0.6] - 2026-10-04
### Fixed
- The packaged zip no longer contains `.gitea/` and `.config/`.
- Release pipeline: the Composer registry rejected the packaged zip (`composer.json file is missing`) because `shopware-cli` zips wrap everything in a top-level folder. The same prebuilt content is now repacked root-level for the registry upload.
- Release steps are idempotent (existing release and asset are reused, registry 409 counts as published) and the "tag exists -> skip" guard is gone, so a failed release can be re-run to completion.
## [0.1.0] - 2026-10-03
### Changed ### Changed
- Services and routes are now configured in YAML; the plugin requires PHP `^8.2`. - Services and routes are now configured in YAML; the plugin requires PHP `^8.2`.
- Release pipeline: the packaged `shopware-cli` zip (with prebuilt assets) is validated and used for both the Gitea Release and the Composer registry; the release is created through the Gitea API after packaging, so a failed build no longer leaves an orphan tag. - Release pipeline: the packaged `shopware-cli` zip (with prebuilt assets) is validated and used for the Gitea Release; the Composer registry gets the same content repacked root-level (Gitea requires `composer.json` at the zip root). The release is created through the Gitea API after packaging, so a failed build no longer leaves an orphan tag.
- New PR checks: `shopware-cli` validate, package build and phpunit. - New PR checks: `shopware-cli` validate, package build and phpunit (with a cached Shopware project and database).
- The PR version check compares against the latest published release instead of the version on `main`.
### Added ### Added
- Dedicated `aeon_dump_manager` monolog channel; dump jobs, deletions and purges are logged. - Dedicated `aeon_dump_manager` monolog channel; dump jobs, deletions and purges are logged.
- Extension icon and `.config/shopware-extension.yml`. - Extension icon and `.config/shopware-extension.yml`.
### Fixed
- The packaged zip no longer contains `.gitea/` and `.config/`.
- Release steps are idempotent (existing release and asset are reused, registry 409 counts as published), so a failed release can be re-run to completion.
### Removed ### Removed
- Empty plugin lifecycle overrides. - Empty plugin lifecycle overrides.
+3 -2
View File
@@ -77,8 +77,9 @@ Gitea workflows in `.gitea/`, plugin-agnostic (name/version come from `composer.
runs from its official Docker image, intentionally unpinned (`latest`): a red build after a CLI release runs from its official Docker image, intentionally unpinned (`latest`): a red build after a CLI release
means fix the config. means fix the config.
- `workflows/plugin-checks.yml` (PRs into `main`) has three jobs: `version-changelog` (every PR into - `workflows/plugin-checks.yml` (PRs into `main`) has three jobs: `version-changelog` (the
`main` must bump `composer.json` version and add a matching `## [x.y.z]` CHANGELOG heading), `package` `composer.json` version must be greater than the latest published Gitea release and have a matching
`## [x.y.z]` CHANGELOG heading), `package`
(shared composite action `actions/package`: `shopware-cli extension package`, `extension validate` on (shared composite action `actions/package`: `shopware-cli extension package`, `extension validate` on
the zip, `scripts/ci/assert-built-assets.sh`), and `phpunit`. The package job caches the tested zip the zip, `scripts/ci/assert-built-assets.sh`), and `phpunit`. The package job caches the tested zip
keyed by the commit's tree hash. keyed by the commit's tree hash.
+1 -1
View File
@@ -3,7 +3,7 @@
"description": "Export database dumps for Shopware 6 environments.", "description": "Export database dumps for Shopware 6 environments.",
"type": "shopware-platform-plugin", "type": "shopware-platform-plugin",
"license": "MIT", "license": "MIT",
"version": "0.1.1", "version": "0.0.6",
"keywords": [ "keywords": [
"shopware", "shopware",
"shopware6", "shopware6",