Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
d49c960
Add herald-publish: the build uploaded to Herald and published as a v…
glaubersilva Nov 30, 2026
ea4660c
herald-publish README: get the changelog file from the changelogger
glaubersilva Nov 30, 2026
92410ce
herald-publish: keep what Herald reads from the ZIP, and confirm what…
glaubersilva Nov 30, 2026
e2eccb9
herald-publish README: link Herald's guide for the ci key
glaubersilva Nov 30, 2026
82b947e
herald-publish: check the ZIP's version, the product and the key befo…
glaubersilva Nov 30, 2026
7131af2
herald-publish: say in the log when the version header is taken out o…
glaubersilva Nov 30, 2026
457541e
herald-publish README: shorter sentences in What it does
glaubersilva Nov 30, 2026
fb7c538
herald-publish: production Herald by default, and a link to the produ…
glaubersilva Dec 1, 2026
6886787
herald-publish: name the Herald address in the log
glaubersilva Dec 1, 2026
913f463
herald-publish: the caller names the Herald instance, with no default
glaubersilva Dec 1, 2026
2dc249c
herald-publish README: how to set Herald up for a repository or an or…
glaubersilva Dec 1, 2026
48d2c14
herald-publish: say only what a failed write is known to have left in…
glaubersilva Dec 1, 2026
a813617
herald-publish: correct the version another run created, like one of …
glaubersilva Dec 1, 2026
293af65
herald-publish: decide by the lines removed whether a changelog had a…
glaubersilva Dec 1, 2026
5bc96eb
herald-publish docs: Herald reads changelog.txt before readme.txt, an…
glaubersilva Dec 1, 2026
a31d75f
herald-publish tests: zips as other tools write them, the timeout and…
glaubersilva Dec 1, 2026
09cdfd7
herald-publish: show the whole answer when its error is not text
glaubersilva Dec 1, 2026
3dd41a8
herald-publish: readZip gives the name and the bytes, and no other field
glaubersilva Dec 1, 2026
8c0779d
release template: say that the Herald step goes after the build
glaubersilva Dec 1, 2026
c2d44df
herald-publish docs: Herald reads a changelog.txt only when it has ve…
glaubersilva Dec 1, 2026
452e5fa
herald-publish: the product input is product-slug, and the README say…
glaubersilva Dec 1, 2026
4c02505
herald-publish README: shorter paragraphs, and a link for each claim …
glaubersilva Dec 1, 2026
4435824
herald-publish: plainer words in three error messages, the comments a…
glaubersilva Dec 1, 2026
c915a21
herald-publish: split the changelog file with the shared lines helper
glaubersilva Dec 1, 2026
684582b
herald-publish: refuse . and .. as the product slug
glaubersilva Dec 1, 2026
0dbde33
herald-publish: warn when the version another run created cannot be read
glaubersilva Dec 1, 2026
c384363
herald-publish README: a failure after Herald confirmed the update do…
glaubersilva Dec 1, 2026
27fb60e
herald-publish: take plain HTTP for an IPv6 localhost too
glaubersilva Dec 1, 2026
f873733
herald-publish: find "product not found" with or without the slug in it
glaubersilva Dec 1, 2026
8b3dd4e
herald-publish: read the Version header the way WordPress does
glaubersilva Dec 1, 2026
9e0a71e
Deploy summary: one list, with links in place of code spans
glaubersilva Dec 1, 2026
d17a308
herald-publish README: a rerun keeps the changelog and the date of a …
glaubersilva Dec 1, 2026
1c53561
herald-publish: say that already-published is about the GitHub releas…
glaubersilva Dec 1, 2026
8ff9427
release-publish: file names in the summary are code spans again
glaubersilva Dec 1, 2026
1eec53c
Summary links: a branch name or a slug cannot end its link early
glaubersilva Dec 1, 2026
9dd8a0f
Summary links: escape an entity and a strikethrough in the text too
glaubersilva Dec 1, 2026
e4335eb
Summary file names: keep the backticks of a name in its code span
glaubersilva Dec 1, 2026
fac5b91
Tests: a create Herald refuses for another reason is not taken for a …
glaubersilva Dec 1, 2026
132ca14
Tests: the update fails when Herald answers with another ZIP
glaubersilva Dec 1, 2026
097109c
herald-publish: show the SHA-256 of a ZIP Herald already held
glaubersilva Dec 1, 2026
d7d6ffa
herald-publish: read the version with the shared rule
glaubersilva Dec 1, 2026
947f13d
herald-publish: the create, the corrections and the update are functi…
glaubersilva Dec 1, 2026
435df23
The zip reader moves to lib/zip.js
glaubersilva Dec 1, 2026
1347af2
herald-publish: a missing key fails the step in the example and the t…
glaubersilva Dec 1, 2026
c8fb53f
herald-publish README: plainer steps, links by branch, the Portal ref…
glaubersilva Dec 1, 2026
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
310 changes: 310 additions & 0 deletions .github/actions/herald-publish/README.md

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions .github/actions/herald-publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Publishes a plugin ZIP to Herald, the service customers download paid plugins from. It uploads the
# ZIP and creates the version when the product does not have it yet. It then points the version at
# the ZIP and sets its status. What a person does by hand in the Herald dashboard for a paid
# release, as one step of the deploy.
#
# The logic lives in herald-publish.js, run by actions/github-script, so there is no dependency to
# install and nothing to build. The calls go to Herald's API, not GitHub's; the checkout is only
# read, for the ZIP and the changelog file.
name: Herald publish
description: Uploads a plugin ZIP to Herald and publishes it as a version of a product

inputs:
herald-url:
description: >-
The address of the Herald instance to publish to, e.g. `https://herald.example.com`. There is
no default: the caller names it. HTTPS, since the API key goes in every request; plain HTTP is
accepted for the machine itself only (`localhost`, `127.0.0.1` or `[::1]`).
Comment thread
glaubersilva marked this conversation as resolved.
Resolved
required: true
product-slug:
description: 'The slug of the product in Herald, as its Products page shows it.'
required: true
version:
description: >-
The version being released: three or four numeric parts, such as 4.17.0 or 4.17.0.1. A version
the product already has is updated, so a run can be repeated after a late failure. A ZIP whose
plugin header holds another version is refused.
required: true
zip:
description: >-
The build to upload: the path of a `.zip`, relative to the checkout. A step before this one
builds it. The action builds nothing and looks for no file on its own.
required: true
status:
description: >-
The state the version is left in: `draft`, `review` or `published`. Only a published version
is served to customers.
required: false
default: 'published'
changelog-file:
description: >-
A file in the checkout with the changelog entries of this version, one per line, each starting
with `* `. No version and no date: Herald shows the field as it is. When empty, the version
keeps the entries Herald read from the changelog.txt or the readme.txt in the ZIP, without the
header line Herald writes above them.
required: false
default: ''
api-key:
description: >-
A Herald API key of scope `ci`, from a secret. That scope can upload ZIPs and create, read and
update versions, and nothing else.
required: true

outputs:
zip-id:
description: 'The id of the ZIP record in Herald.'
value: ${{ steps.publish.outputs.zip-id }}
sha256:
description: 'The SHA-256 of the ZIP. Herald computes it for a ZIP it stores. For a ZIP Herald already held, it is the hash of the file.'
value: ${{ steps.publish.outputs.sha256 }}
status:
description: 'The status the version was left in.'
value: ${{ steps.publish.outputs.status }}
created:
description: '`true` when the version was created, `false` when it existed and was updated.'
value: ${{ steps.publish.outputs.created }}
versions-url:
description: "The page of the Herald dashboard that lists the product's versions, newest first."
value: ${{ steps.publish.outputs.versions-url }}

runs:
using: 'composite'
steps:
- name: Publish the ZIP to Herald
id: publish
uses: actions/github-script@v9
env:
# github-script's require() resolves against the workspace of the repository being built,
# not this action's directory, so the path has to be passed in.
ACTION_PATH: ${{ github.action_path }}
# Read from process.env rather than interpolated into the script, so an input is data and
# never part of the program.
INPUT_HERALD_URL: ${{ inputs.herald-url }}
INPUT_PRODUCT_SLUG: ${{ inputs.product-slug }}
INPUT_VERSION: ${{ inputs.version }}
INPUT_ZIP: ${{ inputs.zip }}
INPUT_STATUS: ${{ inputs.status }}
INPUT_CHANGELOG_FILE: ${{ inputs.changelog-file }}
INPUT_API_KEY: ${{ inputs.api-key }}
with:
script: |
const { runHeraldPublish } = require(`${process.env.ACTION_PATH}/herald-publish.js`)
await runHeraldPublish({ core, env: process.env })
Loading