chore: release as 0.0.6; compare the version check against published releases
- composer.json 0.0.6, CHANGELOG entries of the withdrawn 0.1.0/0.1.1 merged into [0.0.6] - version-changelog: version must exceed the latest published release (main may carry a version whose release was withdrawn), instead of exceeding main's version Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7f3e77a3e9
commit
bfb88a25b8
4 files changed
+25
-28
No files matched your search
@@ -22,26 +22,24 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- 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: |
|
||||
set -e
|
||||
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"
|
||||
|
||||
if [ "$MAIN_VERSION" = "$PR_VERSION" ]; then
|
||||
echo "::error::composer.json version ($PR_VERSION) was not bumped from main ($MAIN_VERSION)"
|
||||
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)"
|
||||
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) is not greater than the latest release ($LATEST)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -50,7 +48,7 @@ jobs:
|
||||
exit 1
|
||||
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,
|
||||
# which is the artifact that ships. A separate directory validate would only repeat these checks.
|
||||
|
||||
+9
-11
@@ -7,27 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.1.1] - 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
|
||||
## [0.0.6] - 2026-10-04
|
||||
|
||||
### Changed
|
||||
|
||||
- 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.
|
||||
- New PR checks: `shopware-cli` validate, package build and phpunit.
|
||||
- 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 (with a cached Shopware project and database).
|
||||
- The PR version check compares against the latest published release instead of the version on `main`.
|
||||
|
||||
### Added
|
||||
|
||||
- Dedicated `aeon_dump_manager` monolog channel; dump jobs, deletions and purges are logged.
|
||||
- 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
|
||||
|
||||
- Empty plugin lifecycle overrides.
|
||||
|
||||
@@ -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
|
||||
means fix the config.
|
||||
|
||||
- `workflows/plugin-checks.yml` (PRs into `main`) has three jobs: `version-changelog` (every PR into
|
||||
`main` must bump `composer.json` version and add a matching `## [x.y.z]` CHANGELOG heading), `package`
|
||||
- `workflows/plugin-checks.yml` (PRs into `main`) has three jobs: `version-changelog` (the
|
||||
`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
|
||||
the zip, `scripts/ci/assert-built-assets.sh`), and `phpunit`. The package job caches the tested zip
|
||||
keyed by the commit's tree hash.
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"description": "Export database dumps for Shopware 6 environments.",
|
||||
"type": "shopware-platform-plugin",
|
||||
"license": "MIT",
|
||||
"version": "0.1.1",
|
||||
"version": "0.0.6",
|
||||
"keywords": [
|
||||
"shopware",
|
||||
"shopware6",
|
||||
|
||||
Reference in new issue
Block a user