A template for building, testing, and publishing a Wippy module. It ships GitHub Actions
that lint and test the module on every pull request, then version and publish it through
release pull requests on main, driven by
Conventional Commits.
The repository is itself a working example module (a greeting library plus a test) so its own CI
is green out of the box. Replace the example with your code.
- Lint and test on every pull request, using the
wippyCLI from the runtime. - The pull request title is enforced to be a valid Conventional Commit.
- Automated semantic versioning and registry publishing via release-please.
- A single source of truth: the heavy lifting lives in reusable workflows hosted here; modules call them by reference, so the pipeline is updated in one place for every module.
The version lives in wippy.yaml and is bumped automatically from the Conventional Commit
messages merged since the last release:
| Commit | Bump | Example |
|---|---|---|
fix: |
patch | 1.2.3 to 1.2.4 |
feat: |
minor | 1.2.3 to 1.3.0 |
feat!: or a BREAKING CHANGE: footer |
major | 1.2.3 to 2.0.0 |
chore:, docs:, refactor:, test:, ci:, ... |
none on their own | no release |
Because merges use squash, the pull request title becomes the commit message, which is why a valid Conventional Commit title is required.
Pre-1.0 note: by default a breaking change on a 0.x module bumps to 1.0.0. To remain in 0.x,
add "bump-minor-pre-major": true to release-please-config.json.
- Merge pull requests to
mainas usual. - release-please opens and maintains a release pull request that bumps
versioninwippy.yaml, updatesCHANGELOG.md, and updates.release-please-manifest.json. - Merge the release pull request. release-please creates the git tag and GitHub release, and the
same workflow run then executes
wippy publish, pushing the new immutable version to the registry. The release workflow runs CI before release-please. Publishing uses the exact released tag and checks the package before upload; it does not depend on a second tag-triggered workflow.
- Click "Use this template".
- In
wippy.yaml, setorganization,module, anddescription. Keepversionat0.0.0and keep.release-please-manifest.jsonat0.0.0; release-please takes over from there. - Rename the namespace in
src/_index.yamlandsrc/test/_index.yaml, and update theexcludeentry pattern inwippy.yamlso it matches your test namespace (it keeps test-only entries out of the published artifact). - Set
package-nameinrelease-please-config.json. - Replace the example
greetinglibrary andsrc/testwith your own entries and tests. Updatesrc/README.md, which is the registry-facing README referenced by thens.definitionentry. - Add a
WIPPY_TOKENrepository secret (a Hub token) and the release-please App secretsRELEASE_PLEASE_APP_ID/RELEASE_PLEASE_APP_PRIVATE_KEY— see Notes. Optionally addWIPPY_REGISTRYto target a non-default registry. .github/workflows/ci.ymlandrelease.ymlalready call the central reusable workflows atwippyai/template-module@v1. You may deleteself-test.yml,tag-major.ymland the tworeusable-*.ymlfiles; they only run inside this template repository.
Add the following to your module repository and open a pull request:
wippy.yamlwithorganization,module,version, thens.definitionREADME reference, and anyexcludepatterns for test-only entries.release-please-config.json(setpackage-nameto your module) and.release-please-manifest.json, seeding the manifest with the module's current published version..github/workflows/ci.ymland.github/workflows/release.ymlcopied from this template (they referencewippyai/template-module@v1).WIPPY_TOKENand the release-please App secretsRELEASE_PLEASE_APP_ID/RELEASE_PLEASE_APP_PRIVATE_KEY— see Notes.
The release workflow uses a GitHub App with contents: write and
pull requests: write, installed on the module repository. Set
RELEASE_PLEASE_APP_ID and RELEASE_PLEASE_APP_PRIVATE_KEY as repository or
organization secrets. App-authored release pull requests trigger their normal CI.
The workflow does not use the default Actions token to open release pull requests.
Publishing is enabled for generated modules. Set WIPPY_TOKEN before the first
merge: the release workflow checks it before creating a release. Use publish: false
on the reusable release call when a repository should create GitHub releases only.
--create creates a missing Hub module as private; configure its intended visibility
in the Hub. A failed lint or test job blocks both release-please and publication.
CI uses official Runtime v0.3.56a by default, verifies its release checksum,
installs locked dependencies, then runs lint and the published wippy/test runner.
The scaffold uses BDD cases and WIPPY_TEST_REQUIRE_CASES=1; missing or skipped-only
cases fail CI. The test namespace, including its test-library dependency, is excluded
from the published module.
This repository validates its own workflows through self-test.yml. Its release
workflow calls the local reusable workflow with publish: false: release-please
creates the template's release pull request and GitHub release without publishing
the example library to the Hub. tag-major.yml moves the floating v1 reference
to the released tag. Consumers at wippyai/template-module@v1 then use that release.
Do not move v1 to an unmerged branch or manually edit release metadata.
Install the wippy CLI by downloading a release binary from runtime releases,
then from the module directory:
wippy install
wippy lint --level error
WIPPY_TEST_REQUIRE_CASES=1 wippy test
wippy publish --dry-run --version 0.1.0.
├── .github/workflows/
│ ├── ci.yml # calls the reusable CI on pull requests and pushes
│ ├── release.yml # calls the reusable release on pushes to main
│ ├── reusable-ci.yml # lint, test, and PR-title check (reusable)
│ ├── reusable-release.yml # release-please and publish (reusable)
│ ├── self-test.yml # runs the reusable CI against this template only
│ └── tag-major.yml # moves the v1 tag when a vX.Y.Z tag is pushed (template only)
├── release-please-config.json
├── .release-please-manifest.json
├── wippy.yaml # module manifest (organization, module, version)
├── wippy.lock # dependency lock
└── src/ # module source and BDD cases (wippy/test owns the runner)