feat(ci): release-please pipeline to lint, test, and publish modules#1
Open
skhaz wants to merge 3 commits into
Open
feat(ci): release-please pipeline to lint, test, and publish modules#1skhaz wants to merge 3 commits into
skhaz wants to merge 3 commits into
Conversation
Why: The template-module repo was the scaffold for new Wippy modules but had drifted: it used the legacy packcli.yaml manifest and a publish.yml calling wippyai/action-module-release@main, which no longer exists (404). It had no lint, no tests, and no automated versioning. What: Overhaul it into a modern template driven by the wippy CLI from the runtime. Reusable workflows lint and test every pull request and, on merge to main, release-please bumps wippy.yaml's version from Conventional Commits and publishes the new immutable version to the registry. The repo is itself a working example module so its own CI is green. How: - reusable-ci.yml: download and checksum-verify the wippy binary, run wippy lint and wippy test, and a Conventional-Commit PR-title check. - reusable-release.yml: release-please (simple type, yaml extra-files updater for wippy.yaml $.version) and, in the same run, wippy publish --create. - Thin callers (ci.yml, release.yml) reference the central workflows at @v1; self-test.yml exercises them on the template itself; tag-major.yml keeps the floating v1 tag in sync. - Example module under src/ with a greeting library, a test, and a runner; wippy.yaml excludes the test namespace from the published artifact. - Remove legacy packcli.yaml and publish.yml.
…ase PR Why: The wippyai org blocks GitHub Actions from creating pull requests, so release-please cannot open the release PR with the default GITHUB_TOKEN (verified end-to-end on a throwaway consumer repo). What: Accept an optional RELEASE_PLEASE_TOKEN secret and pass it to release-please, falling back to GITHUB_TOKEN when absent. Document the requirement.
Why: The wippyai org blocks Actions from creating PRs, so release-please needs a non-default credential. A GitHub App is the most secure, non-expiring option. What: When RELEASE_PLEASE_APP_ID/RELEASE_PLEASE_APP_PRIVATE_KEY secrets are present, mint a short-lived token with actions/create-github-app-token and use it for release-please; fall back to RELEASE_PLEASE_TOKEN, then GITHUB_TOKEN. Document the App setup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
template-modulewas the scaffold for new Wippy modules but had drifted: it used the legacypackcli.yamlmanifest and apublish.ymlthat calledwippyai/action-module-release@main, a repothat now returns 404. There was no lint, no tests, and no automated versioning.
What
Overhaul it into a modern template driven by the
wippyCLI from the runtime, with GitHub Actionsthat lint and test every pull request and, on merge to
main, version and publish the module to theWippy registry from Conventional Commits (
fix→patch,feat→minor, breaking→major) viarelease-please. The repo is itself a working example module, so its own CI is green.
reusable-ci.yml/reusable-release.yml: central, reusable workflows (lint, test, PR-titlecheck; release-please +
wippy publishin the same run, sidestepping the GITHUB_TOKENActions-can't-trigger-Actions limitation).
ci.yml/release.yml: thin callers referencingwippyai/template-module@v1.self-test.ymlexercises the reusable CI on the template only;
tag-major.ymlkeeps the floatingv1tag in sync.src/(greeting library + test + runner);wippy.yamlexcludes the testnamespace from the published artifact.
packcli.yamlandpublish.yml.Setup (consumers)
Add a
WIPPY_TOKENrepository secret (optionallyWIPPY_REGISTRY). New modules: "Use thistemplate". Existing modules: see the migration section in the README.
Testing (local, against wippy v0.3.12a)
wippy lint --level errorand--level warning: exit 0, no issues.wippy test: exit 0 (proven exit 1 when a test is broken).wippy publish --dry-run --version 0.1.0: exit 0; packs 1.2 KB with the test namespace excluded(2.2 KB without the
exclude).actionlinton all workflows: clean.extra-filesupdaterrewrites
wippy.yamlversion; the bump engine maps fix/feat/breaking as expected.End-to-end release-please (release PR → tag → registry publish) exercises real GitHub + registry
APIs and is verified after merge, once the
v1tag is created (git tag v1.0.0 && git push origin v1.0.0).