Skip to content

Add a GitHub Actions release workflow - #14

Open
harikt wants to merge 2 commits into
masterfrom
release-workflow
Open

Add a GitHub Actions release workflow#14
harikt wants to merge 2 commits into
masterfrom
release-workflow

Conversation

@harikt

@harikt harikt commented Aug 26, 2026

Copy link
Copy Markdown
Member

Replaces the PHP release commands with a reusable GitHub Actions workflow that packages call. Opting in is a ~15 line caller file; the checks, change log parsing and publish live here, so the release process for every package is fixed in one place.

Releasing: Actions → Release → pick the branch, type the version.

gh workflow run release.yml --ref 6.x -f version=6.0.0

Why

release3 is eight shell checks and one POST /releases, wrapped in swiftmailer 5, twitteroauth, iron_mq, monolog 1.x and aura/di 2.x — all abandoned or EOL, for tweet and mail code that has been commented out for years. The phpdoc @package validation targets a phpDocumentor XML template that no longer exists; .travis.yml is required for a dead service.

The decision worth reviewing

The workflow creates the tag; the tag does not trigger the workflow.

Packagist derives versions from git tags and never looks at GitHub releases, so a pushed tag is already published. A workflow triggered on a tag push can only fail after the fact, while Composer serves the version its checks were meant to guard. Here the version is a dispatch input, checks run first, and the tag is created last or not at all — targeting the tested commit, not the branch name.

Notes come from the change log

--generate-notes is not used, no fallback. The version must match the change log's top heading. CHANGELOG.md/CHANGES.md and #/## headings all work.

Pre-releases match either their own version or the base they lead up to, so 6.0.0-alpha1 releases against a ## 6.0.0 section, (unreleased) marker and all. A final release demands an exact match with the marker gone.

Verified against the real change logs

Change log Version Result
Aura.Html ## 6.0.0 6.0.0 releases
Aura.Html ## 6.0.0 6.0.0-alpha1 / -beta1 / -RC1 releases against base
Aura.Html ## 6.0.0 5.0.0 refused
Aura.Input ## 6.0.0 6.0.0 releases, ### subheads kept
Aura.Router # 3.4.2 (CHANGES.md) 3.4.2 releases
Aura.SqlQuery ## 6.0.0 (unreleased) 6.0.0-alpha1 releases
Aura.SqlQuery ## 6.0.0 (unreleased) 6.0.0 refused

Not yet run on GitHub

auraphp/Aura.Html#75 adopts it, pinned to this branch. Merge that after this, then switch its uses: to @master.

workflow_dispatch only registers from a package's default branch; releasing an older line needs the caller on that branch too.

The PHP release commands depend on a stack that has aged out: swiftmailer 5,
ricardoper/twitteroauth, iron_mq, monolog 1.x and aura/di 2.x are all abandoned
or EOL, and the tweet and mailing-list code they exist for has been commented
out for years. The phpdoc @Package validation targets a phpDocumentor XML
template that no longer exists, and .travis.yml is required for a CI service
that shut down. Underneath all of it, release3 is eight shell checks and one
POST to /releases.

Replace it with a reusable workflow that packages call. Opting in is a ~15 line
caller in the package; everything else lives here, so fixing the release
process for every package is a change to this repo alone.

The workflow creates the tag rather than reacting to one. Packagist derives
package versions from git tags and never looks at GitHub releases, so a pushed
tag is already a published version -- checks that run after a tag push can fail
loudly while Composer serves the version they were meant to guard, and the only
remedy is deleting a tag that may already be in someone's lock file. Here the
version is a dispatch input, the checks run first, and the tag is created last
or not at all. It targets the tested commit rather than the branch name, so a
push mid-run cannot move it.

Release notes are read from the package's own change log; --generate-notes is
not used and there is no fallback to it. The version must match the change
log's top heading, which may not still be marked unreleased. CHANGELOG.md and
CHANGES.md are both accepted, as are version headings at either # or ## level,
since the packages are not consistent.

The legacy commands are untouched and still work.
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 774cfa39-71ac-47b1-ae0e-ea6b11f16fac

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Requiring the change log heading to equal the version exactly made
pre-releases impossible in practice: a package whose change log heads with
'## 6.0.0' could not cut 6.0.0-alpha1, because the heading did not match. That
rules out the safest way to exercise the whole pipeline -- publish included --
without committing to a final version.

A pre-release now matches either its own version or the base version it leads
up to, so 6.0.0-alpha1, -beta1 and -RC1 all release against a '## 6.0.0'
section. A final release still demands an exact match.

The '(unreleased)' marker is relaxed the same way, and for the same reason: it
means the final version is not out yet, which is exactly true while cutting
pre-releases of it. It still blocks a final release.
@harikt

harikt commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Pushed 008270f: pre-releases can now run against the section they lead up to.

The strict heading equality made pre-releases impossible in practice — Aura.Html's change log heads with ## 6.0.0, so dispatching 6.0.0-alpha1 would have failed the change-log check. That ruled out the safest way to exercise the whole pipeline, publish included, without committing to a final version.

Now:

  • a pre-release matches either its own version or the base version it leads up to, so 6.0.0-alpha1, -beta1 and -RC1 all release against a ## 6.0.0 section
  • the (unreleased) marker is relaxed the same way — it means the final version is not out yet, which is exactly true while cutting alphas of it
  • a final release is unchanged: exact heading match, marker must be gone

Re-verified against the real change logs:

Change log Version Result
Aura.Html ## 6.0.0 6.0.0-alpha1 / -beta1 / -RC1 matches base
Aura.Html ## 6.0.0 6.0.0 matches exactly
Aura.Html ## 6.0.0 5.9.0-alpha1 rejected, wrong base
Aura.SqlQuery ## 6.0.0 (unreleased) 6.0.0-alpha1 allowed
Aura.SqlQuery ## 6.0.0 (unreleased) 6.0.0 rejected, still unreleased

harikt added a commit to auraphp/Aura.Html that referenced this pull request Aug 26, 2026
Releasing becomes: Actions -> Release -> pick the branch and type the version.
The shared workflow in auraphp/bin runs the checks, takes the release notes
from this package's CHANGELOG.md, and creates the tag only if everything
passed.

Do not tag by hand. Packagist derives package versions from git tags and never
looks at GitHub releases, so a pushed tag is already a published version.

Pinned to the auraphp/bin branch while auraphp/bin#14 is open; switch to
@master once that merges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant