Skip to content

Move PHP/FrankenPHP binaries to a dedicated 'artifacts' release#59

Merged
munezaclovis merged 2 commits intomainfrom
feat/artifacts-release
Apr 14, 2026
Merged

Move PHP/FrankenPHP binaries to a dedicated 'artifacts' release#59
munezaclovis merged 2 commits intomainfrom
feat/artifacts-release

Conversation

@munezaclovis
Copy link
Copy Markdown
Contributor

Summary

  • Decouples FrankenPHP + static PHP CLI binaries from pv's versioned releases by moving them to a single non-versioned artifacts release (marked --latest=false so v* stays the user-facing latest).
  • Simplifies build-frankenphp.yml: creates the artifacts release if missing, then clobbers on every rebuild — no more hunting for the "latest v* tag".
  • Simplifies release.yml: drops the forward-copy step entirely. pv releases now ship only the pv binary.
  • Simplifies the Go install path: install.go and available.go hit releases/download/artifacts/... directly; latestReleaseTag() is gone, along with its encoding/json/io imports.

Why

FrankenPHP and PHP CLI binaries have their own lifecycle (weekly cron against php/frankenphp:latest). Previously they were attached to whatever pv v* release happened to be "latest", and every new pv tag had to babysit a forward-copy step just to preserve install URLs. That meant:

  • pv release notes polluted with unrelated binary assets
  • install URLs pointing at version tags that have nothing to do with binary versioning
  • a copy step in release.yml that's silently load-bearing for installs

Separation fixes all three.

⚠️ Transition (clean break)

The artifacts release does not exist yet. Before merging / tagging the next pv version:

  1. Seed the artifacts release. Either:
    • Trigger build-frankenphp.yml on main (manual workflow_dispatch) after merge. The workflow now creates the release on first run. Until it completes, pv php:install on the new code will 404.
    • Or manually: gh release create artifacts --latest=false --title \"PHP binaries\" --notes \"...\" and copy current php-* / frankenphp-* assets from v0.0.5 into it.
  2. Then tag v0.0.6 with the new install code.

Pre-v0.0.6 pv installs already out in the wild are unaffected — they download from their original v* URLs. The clean break only matters for new installs on v0.0.6+.

Files

  • `.github/workflows/build-frankenphp.yml` — uploads to `artifacts` tag
  • `.github/workflows/release.yml` — copy step removed
  • `internal/phpenv/install.go` — uses `artifactsTag` constant; `latestReleaseTag()` removed
  • `internal/phpenv/available.go` — queries `/releases/tags/artifacts` directly

Test plan

  • `gofmt`, `go vet`, `go build`, `go test ./...` clean locally
  • Both workflow YAMLs parse
  • After merge, `workflow_dispatch` of build-frankenphp.yml on main creates the `artifacts` release and uploads all 6 assets
  • `gh release view artifacts` shows `isLatest: false` and expected asset list
  • Tagging v0.0.6 publishes only the pv binary (no frankenphp/php-* assets on the v* release)
  • `pv php:install 8.4` on a fresh install using v0.0.6 successfully downloads from the `artifacts` release

FrankenPHP and static PHP CLI binaries previously lived on whatever
v* release happened to be latest, carried forward by a copy step on
every new pv release. Their lifecycle (weekly cron against
php/frankenphp:latest) has nothing to do with pv's own semver, so
that coupling meant:

- pv release notes polluted with unrelated binary assets
- every new pv tag babysitting a forward-copy of binaries it didn't
  actually change
- install URLs depending on "latest v* tag" instead of a stable target

Move all FrankenPHP + PHP CLI binaries to a single, non-versioned
"artifacts" release (marked --latest=false so v* stays the user-facing
latest). build-frankenphp.yml now creates the release if missing and
always clobbers it; release.yml drops the copy step entirely; the Go
install path hits github.com/prvious/pv/releases/download/artifacts/...
directly, and latestReleaseTag() is gone.

Clean break: after merge, users with pre-v0.0.6 installs will still
fetch binaries from their original v* release URLs (historical); new
installs go through the artifacts release. Before tagging v0.0.6,
the artifacts release must be seeded — either by triggering
build-frankenphp.yml on main, or by creating and copying assets
manually.
build-frankenphp.yml also builds the static PHP CLI (not just
FrankenPHP) and now uploads to the dedicated "artifacts" release,
so rename it to build-artifacts.yml with display "Build PHP
Artifacts".

release.yml no longer carries any PHP binaries — only the pv CLI
ships there now — so rename it to release-pv.yml with display
"Release pv".

Also updates the concurrency group name, the release-notes string,
and the in-code comment reference to match.
@munezaclovis munezaclovis merged commit 651f8f7 into main Apr 14, 2026
1 check failed
@munezaclovis munezaclovis deleted the feat/artifacts-release branch April 14, 2026 05:34
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