The .github/ directory contains GitHub Actions building blocks (reusable workflows, composite actions, and caller workflow templates) intended to be vendored into other repositories via an externpro/externpro git submodule.
An "xpro package" is an externpro-produced release artifact (plus its manifest metadata) that downstream projects can consume via find_package().
.github/wf-templates/- Caller workflow templates vendored into project repos (copied into the project's
.github/workflows/)
- Caller workflow templates vendored into project repos (copied into the project's
.github/workflows/- Reusable workflows called by the caller workflows
.github/actions/- Composite actions used by the reusable workflows
This is the typical flow for adopting externpro workflows in a project repo:
-
Create (or fork) the repo.
-
Add externpro as a submodule at
.devcontainer:git submodule add https://github.com/externpro/externpro .devcontainer
-
Run the bootstrap script:
./.devcontainer/scripts/bootstrap.sh
The script creates the
xprobranch, copies workflow templates, checks XPRO_TOKEN configuration, and commits the setup. -
Verify the setup works locally:
cmake --list-presets cmake --preset=<platform> cmake --workflow --preset=<platform>
Commit and push any cmake configuration changes.
-
Run
xpSyncworkflow:- Via Actions tab: https://github.com/OWNER/REPO/actions/workflows/xpsync.yml
- Via CLI:
gh workflow run xpsync.yml --ref xpro --repo OWNER/REPO
This opens a PR that standardizes presets, workflows, and repo wiring.
-
Merge the PR. Builds run via
xpBuild. If you add therelease:taglabel, merging also drives tag -> tagged build -> draft release.
See:
XPRO_TOKEN- Used by caller workflow templates as
secrets.XPRO_TOKEN, passed through to reusable workflows asautomation_token. - Required for
xpsyncwhen workflow changes are needed. - Recommended for
xptagwhen tag pushes must trigger downstream workflows. - Setup details: see Secrets and tokens.
- Used by caller workflow templates as
GHCR_TOKEN- Classic PAT with
read:packagesandwrite:packagesscopes. - Used by
xpbuildfor GHCR push retry on permission errors. - Optional:
github.tokenworks for most GHCR operations. - Setup details: see Secrets and tokens.
- Classic PAT with
- Caller workflows
xpsync,xpbuild,xptag,xprelease(what triggers them and what they call)
- Reusable workflows
sync-externpro,build-*,tag-release,release-from-build
- Release flow
- PR merge +
release:tag-> tag -> tagged build -> draft GitHub Release
- PR merge +
- Build customization
- Linux arch/toolchain matrix, Windows toolchain matrix, and common knobs
- Supply chain
- SBOM and provenance/attestations
- Secrets and tokens
XPRO_TOKENandGHCR_TOKEN, when they're required, and how to configure them
- Architecture overview
- How the workflow and packaging pieces fit together
