Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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<Version from hibira.php>, 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 }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**.

Expand Down
Loading