How axolotl-pm/pmmp-plugin-actions works
Purpose and Entry Points
This repository is a reusable GitHub Actions package for PocketMine-MP plugin delivery. Its public entry points are four composite actions, each exposed through its action manifest:
• build-phar/action.yml
• validate-release/action.yml
• publish-release/action.yml
• publish-nightly/action.yml
Consumer repositories invoke these actions in their own workflows after checkout; this repository does not host or run a plugin itself.
Build and Artifact Stage
build-phar/action.yml is the central production stage. It provisions a requested PHP runtime, reads plugin metadata from the consumer checkout’s plugin.yml, packages/compresses the plugin into a PHAR, and uploads it as a GitHub Actions artifact.
Its interface carries metadata across job boundaries: plugin name, plugin version, PocketMine-MP API version, artifact name, PHAR path, and staging directory. Inputs define packaging boundaries, including plugin directory, Composer inclusion/version, extra sources/assets, artifact retention, and optional Poggit staging.
Release Validation Gate
validate-release/action.yml is a pass/fail gate for tag-triggered releases. It compares the pushed Git tag against the plugin version declared in plugin.yml, normalizing a leading v and prerelease suffixes before comparison.
This action must execute after actions/checkout in the caller’s job and should precede build-phar in a release workflow. It prevents publishing a binary whose declared plugin version does not match the release tag.
Stable Release Publication
publish-release/action.yml consumes the artifact identifier and build metadata emitted by build-phar. It downloads the uploaded PHAR and creates a GitHub Release, attaching the binary and deriving prerelease status from tags containing -.
The boundary between build and publication is GitHub Actions artifact storage: callers must explicitly promote composite-action outputs to job outputs, then pass them to the publishing job. Publishing requires contents: write; checkout is not required for this stage.
Nightly Publication
publish-nightly/action.yml implements the mutable development-release path. It consumes the same build artifact and metadata, force-updates the nightly tag to a selected commit SHA, then creates or updates a nightly prerelease with timestamped/version-aware release information.
Unlike stable publishing, this action needs the caller checkout because it moves a Git ref. It also requires contents: write. The mutable tag is the key control boundary separating nightly outputs from immutable version-tag releases.
Runtime, Infrastructure, and External Services
All behavior runs as GitHub Actions composite actions on caller-selected runners, typically ubuntu-latest. Key infrastructure dependencies are GitHub checkout, artifact upload/download, Git refs/tags, and GitHub Releases.
The build path depends on PHP binaries available through pmmp/PHP-Binaries, Composer when enabled, and the PocketMine-MP plugin format/API metadata. Optional staging integrates with Poggit CI. Repository-local quality automation is defined at .github/workflows/linter.yml.
Main entry points: build-phar/action.yml Build PHAR · publish-nightly/action.yml Publish nightly · publish-release/action.yml Publish release · validate-release/action.yml Validate release
Components 16
Consumer workflow
Caller repository job and cross-job output boundary.
- Caller workflow · Runs after checkout on a caller-selected runner.
- plugin.yml · Supplies name, version, and PocketMine-MP API metadata.
- Pushed version tag · Immutable release trigger and validation input.
- Promoted job outputs · Carries artifact ID and build metadata across jobs.
Composite actions
Reusable delivery action entry points.
- Build PHAR · Central packaging stage.
build-phar/action.yml - Validate release · Fails when normalized tag and declared version differ.
validate-release/action.yml - Publish release · Creates a stable GitHub Release from a build artifact.
publish-release/action.yml - Publish nightly · Moves the nightly tag and creates or updates its prerelease.
publish-nightly/action.yml - Repository linter
.github/workflows/linter.yml
GitHub platform
GitHub Actions storage, refs, and release services.
- Actions artifacts · Explicit build-to-publication boundary.
- Git refs and tags · Nightly publication force-updates the mutable nightly tag.
- GitHub Releases · Hosts attached stable and nightly PHAR binaries.
Other components
- PMMP PHP binaries
- Composer · Included when enabled by build inputs.
- PHAR package · Compressed plugin binary produced from configured sources and assets.
- Poggit CI
Connections 19
- Caller workflow → Validate release: tag release gate
- Pushed version tag → Validate release: compare version
- plugin.yml → Validate release: declared version
- Caller workflow → Build PHAR: invoke after checkout
- plugin.yml → Build PHAR: read metadata
- PMMP PHP binaries → Build PHAR: provision PHP
- Composer → Build PHAR: when enabled
- Build PHAR → PHAR package: package and compress
- Build PHAR → Actions artifacts: upload PHAR
- Build PHAR → Promoted job outputs: emit metadata and artifact ID
- Build PHAR → Poggit CI: optional staging
- Promoted job outputs → Publish release: pass across jobs
- Actions artifacts → Publish release: download PHAR
- Publish release → GitHub Releases: create stable release
- Promoted job outputs → Publish nightly: pass across jobs
- Actions artifacts → Publish nightly: download PHAR
- Caller workflow → Publish nightly: checkout required
- Publish nightly → Git refs and tags: force-update nightly
- Publish nightly → GitHub Releases: upsert prerelease