From 7d5756ce96f2794572883d8eb0b13dc2a1d75c7c Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 30 Oct 2026 15:50:24 +0000 Subject: [PATCH] Attach hibira.zip to releases, unpacking to hibira/ The source zip GitHub makes unpacks to wordpress-/, so each upload would install a second copy instead of replacing the plugin. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01SHtsCC9DTZw125ZPyWSqau --- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ README.md | 6 +++--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..da2265b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +# Attaches hibira.zip to each published GitHub Release, ready for Plugins → +# Add New → Upload Plugin. It unpacks to hibira/ whatever the version, so an +# upload replaces the installed plugin instead of adding a second copy. The +# tag must be v, e.g. v0.1.0. +name: release +on: + release: + types: [published] + +permissions: + contents: write + +jobs: + zip: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Tag matches the plugin version + run: | + version="$(sed -n 's/^ \* Version: *//p' hibira.php)" + [ "v$version" = "$GITHUB_REF_NAME" ] || { echo "tag $GITHUB_REF_NAME != v$version"; exit 1; } + - run: git archive --format=zip --prefix=hibira/ -o hibira.zip HEAD + - run: gh release upload "$GITHUB_REF_NAME" hibira.zip --clobber + env: + GH_TOKEN: ${{ github.token }} diff --git a/README.md b/README.md index ad919cd..6ab8437 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,9 @@ No Composer, no build step: the PHP side signs Hibira HTTP API calls itself ## Install -Until it is on WordPress.org: download the zip from -[Releases](https://github.com/hibira-io/wordpress/releases), then **Plugins → -Add New → Upload Plugin**. Go to **Settings → Hibira**, paste the app ID, key +Until it is on WordPress.org: download `hibira.zip` from the +[latest release](https://github.com/hibira-io/wordpress/releases/latest), then +**Plugins → Add New → Upload Plugin**. Go to **Settings → Hibira**, paste the app ID, key and secret from your app in the [Hibira portal](https://hibira.io/portal) (the free plan is enough) and press **Send a test event**.