From 61b4b2b1af2c4589ab0a6ccdcd3f3e08f09b5f6d Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Mon, 21 Sep 2026 20:10:55 +0200 Subject: [PATCH 1/4] ci: link the published Composer package to this repository --- .gitea/workflows/release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index d941600..952bcfc 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -21,8 +21,10 @@ jobs: run: | set -e VERSION=$(grep -m1 '"version"' composer.json | sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/') + PACKAGE_NAME=$(grep -m1 '"name"' composer.json | sed -E 's/.*"name"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/') TAG="v${VERSION}" echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + echo "package_name=${PACKAGE_NAME}" >> "$GITHUB_OUTPUT" echo "tag=${TAG}" >> "$GITHUB_OUTPUT" if git ls-remote --tags origin "refs/tags/${TAG}" | grep -q "${TAG}"; then echo "skip=true" >> "$GITHUB_OUTPUT" @@ -98,3 +100,13 @@ jobs: echo "Unexpected HTTP status $STATUS publishing to the Composer registry" exit 1 fi + + - name: Link Composer package to this repository + if: steps.version.outputs.skip == 'false' + run: | + ENCODED_NAME=$(printf '%s' "${{ steps.version.outputs.package_name }}" | sed 's#/#%2F#g') + STATUS=$(curl -s -o /dev/null -w "%{http_code}" -u "haylan:${{ secrets.RELEASE_TOKEN }}" -X POST "https://git.arthurerlich.de/api/v1/packages/haylan/composer/${ENCODED_NAME}/-/link/AeonDumpManager") + echo "link status: $STATUS" + if [ "$STATUS" != "201" ]; then + echo "::warning::Failed to link the Composer package to this repository (HTTP $STATUS) - not fatal, release already published" + fi -- 2.54.0 From b93217cc5168a421b9a942fd363f374d32093bc9 Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Mon, 21 Sep 2026 20:11:54 +0200 Subject: [PATCH 2/4] test: verify RELEASE_TOKEN can call the package-link endpoint --- .gitea/workflows/test-link.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .gitea/workflows/test-link.yml diff --git a/.gitea/workflows/test-link.yml b/.gitea/workflows/test-link.yml new file mode 100644 index 0000000..a5630c5 --- /dev/null +++ b/.gitea/workflows/test-link.yml @@ -0,0 +1,13 @@ +name: test-link +on: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Test link endpoint with RELEASE_TOKEN + run: | + STATUS=$(curl -s -o /tmp/out.log -w "%{http_code}" -u "haylan:${{ secrets.RELEASE_TOKEN }}" -X POST "https://git.arthurerlich.de/api/v1/packages/haylan/composer/aeon%2Fdump-manager/-/link/AeonDumpManager") + echo "status: $STATUS" + cat /tmp/out.log -- 2.54.0 From b8b8ee628484961978ccd85e4a411733be341c21 Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Mon, 21 Sep 2026 20:39:10 +0200 Subject: [PATCH 3/4] ci: treat HTTP 400 (already linked) as expected on the package-link step --- .gitea/workflows/release.yml | 4 ++-- .gitea/workflows/test-link.yml | 13 ------------- 2 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 .gitea/workflows/test-link.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 952bcfc..ed1e8bb 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -107,6 +107,6 @@ jobs: ENCODED_NAME=$(printf '%s' "${{ steps.version.outputs.package_name }}" | sed 's#/#%2F#g') STATUS=$(curl -s -o /dev/null -w "%{http_code}" -u "haylan:${{ secrets.RELEASE_TOKEN }}" -X POST "https://git.arthurerlich.de/api/v1/packages/haylan/composer/${ENCODED_NAME}/-/link/AeonDumpManager") echo "link status: $STATUS" - if [ "$STATUS" != "201" ]; then - echo "::warning::Failed to link the Composer package to this repository (HTTP $STATUS) - not fatal, release already published" + if [ "$STATUS" != "201" ] && [ "$STATUS" != "400" ]; then + echo "::warning::Unexpected status linking the Composer package to this repository (HTTP $STATUS) - not fatal, release already published" fi diff --git a/.gitea/workflows/test-link.yml b/.gitea/workflows/test-link.yml deleted file mode 100644 index a5630c5..0000000 --- a/.gitea/workflows/test-link.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: test-link -on: - workflow_dispatch: - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Test link endpoint with RELEASE_TOKEN - run: | - STATUS=$(curl -s -o /tmp/out.log -w "%{http_code}" -u "haylan:${{ secrets.RELEASE_TOKEN }}" -X POST "https://git.arthurerlich.de/api/v1/packages/haylan/composer/aeon%2Fdump-manager/-/link/AeonDumpManager") - echo "status: $STATUS" - cat /tmp/out.log -- 2.54.0 From 63134f7de472dec0eeeea27630496b6aea6cbc62 Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Mon, 21 Sep 2026 20:40:03 +0200 Subject: [PATCH 4/4] chore(release): bump to 0.0.4 for the Composer package-link fix --- CHANGELOG.md | 8 ++++++++ composer.json | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 783a80c..4ede53b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.0.4] - 2026-09-21 + +### Fixed + +- Published Composer packages are now linked to this repository (previously the release workflow + published them without a repository association, so they did not appear under the repo's + Packages tab). + ## [0.0.3] - 2026-09-17 ### Added diff --git a/composer.json b/composer.json index 9e67cbd..a6f0fe7 100755 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Export database dumps for Shopware 6 environments.", "type": "shopware-platform-plugin", "license": "MIT", - "version": "0.0.3", + "version": "0.0.4", "keywords": [ "shopware", "shopware6", -- 2.54.0