@floez-werk/pi-extension-release-tool0.1.7
Release tooling for FloezWerk pi extensions: scaffolding, README release-notes sync, GitHub release notes and the shared CI/CD workflows.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
pi-extension-release-tool
Release tooling, shared CI/CD and the project template for the FloezWerk pi extensions. Everything that used to be copied into each extension repository lives here once.
Table of contents
- What is in here
- Tooling
- Prompt template: new extension
- New extension repository
- Releasing an extension
- Updating this toolkit
- Optional: Gitea as source
- Changelog
What is in here
tooling/- the published npm package@floez-werk/pi-extension-release-tool(commandpi-release): scaffolding, generated README blocks (badges, release notes) and the GitHub release body. Used by every extension repository vianpx -y …@^0.1 ….template/- the skeleton a new extension repository starts from (extension stub, README with badges and the changelog block,CHANGELOG.md,package.json,AGENTS.md,LICENSE,.gitignore/.gitattributes, thin CI/release callers, and a.gitea/workflows/placeholder for the optional Gitea setup, see Gitea as source)..github/workflows/reusable-*.yml- the shared CI and release pipelines. Extension repositories call them withuses: …/reusable-release.yml@v0.1, so a fix here reaches all of them without touching their files.prompts/- the interactive prompt template shipped with the package (/new-pi-extension): it collects the scaffold parameters, then follows the "New extension repository" flow below. Install the package as a pi package to get it.
Nothing in here is specific to a single extension; extension-specific code stays in the extension repository.
Tooling
# scaffold a new extension repository (see below for the full flow)
npx -y @floez-werk/pi-extension-release-tool@^0.1 init /srv/projects/piagent-my-ext \
--name @floez-werk/piagent-my-ext \
--desc "Pi extension: one-line description"
# regenerate the generated README blocks (badges, release notes) / verify them
npx -y @floez-werk/pi-extension-release-tool@^0.1 sync-readme
npx -y @floez-werk/pi-extension-release-tool@^0.1 sync-readme --check
# GitHub release body (the CHANGELOG section of the current version)
npx -y @floez-werk/pi-extension-release-tool@^0.1 release-notes --out /tmp/notes.md
# move the moving "v<major>.<minor>" tag (run after a release, from the repo)
npx -y @floez-werk/pi-extension-release-tool@^0.1 tag-major --push
The README and release-notes subcommands read package.json and
CHANGELOG.md from the current directory, so they work in any repository. Two
blocks in README.md are generated instead of maintained by hand (both guarded
by --check in CI):
- the badges block (
badges:start/badges:end) - npm version, license, CI and changelog badges built frompackage.json(skipped in repositories without the markers) - the release-notes block (
changelog:start/changelog:end) - the notes of the current version fromCHANGELOG.md
Write those marker names in prose and in CHANGELOG.md without the comment
syntax; a literal marker would look like a second block to the check.
Prompt template: new extension
The package is also a pi package and ships one prompt template. Install it once and the wizard is available as a slash command:
pi install npm:@floez-werk/pi-extension-release-tool
Run /new-pi-extension (no arguments needed). It asks for the package name, the
brief and the optional init flags, then scaffolds the repository and implements
the extension as described under New extension repository.
After a package update, /reload picks up the new version of the template.
New extension repository
<repo> below is the repository name, e.g. piagent-my-ext.
GitHub: create the repository (empty, public). GitHub runs the CI and release workflows. Working through Gitea first is optional, see Gitea as source.
Scaffold the repository (the tooling comes from npm, no clone needed):
npx -y @floez-werk/pi-extension-release-tool@^0.1 init /srv/projects/<repo> \ --name @floez-werk/<repo> \ --desc "Pi extension: one-line description" cd /srv/projects/<repo> && npm run checkThe scaffolder replaces all placeholders, generates the README release-notes block, runs
git init -b mainand creates the initial commit. Useful flags:--ext <file.ts>(extension file, default<repo>.ts),--cmd <name>(command without slash),--owner,--no-git.Push to GitHub:
git remote add origin git@github.com:FloezWerk/<repo>.git git push -u origin mainFirst npm publish (manual, once per package): the package does not exist on npm yet, so an automation token cannot be scoped to it. Run locally:
npm login npm publish --access publicDo not push the tag of this version (
v0.1.0): the release workflow rejects versions that are already published, so the first tag-driven release is the next patch (v0.1.1). Keep the0.1.0heading link inCHANGELOG.mdpointing at npm.npmjs.com: add a Trusted Publisher (package → Settings → Trusted Publisher): owner and repository of the GitHub repo, workflow filename
release.yml, no environment. NoNPM_TOKENsecret is needed - permissions and the workflow call are already in the scaffolded files. Optional: enable "Require two-factor authentication and disallow tokens" for the package.Optional, after the first tag-driven release: point the
[Unreleased]link inCHANGELOG.mdatcompare/v0.1.1...HEADinstead ofcommits/main.Verify the pipeline with the next change: bump the patch version, move the
[Unreleased]bullets into a headingX.Y.Z - YYYY-MM-DD(version linked to its GitHub release),npm run readme, commit, thengit tag -a vX.Y.Z -m "vX.Y.Z" && git push origin main vX.Y.ZGitHub Actions then publishes to npm (with provenance), creates the GitHub release from the CHANGELOG section and attaches the tarball.
pi.dev/packageslists the package automatically (pi-packagekeyword).
Releasing an extension
- Move the
[Unreleased]bullets into a headingX.Y.Z - YYYY-MM-DD(the version links its GitHub release) inCHANGELOG.md. - Bump
"version"inpackage.json, runnpm run readme, commit both. git tag -a vX.Y.Z -m "vX.Y.Z" && git push origin main vX.Y.Z.
The rest is the shared pipeline (see reusable-release.yml).
Updating this toolkit
- Versioning is
0.y.z; every change totooling/ortemplate/must end in a release, otherwise the pinnednpxversion in the extensions does not see it. - Release:
CHANGELOG.md([Unreleased]→ headingX.Y.Z - YYYY-MM-DD),npm run readme, version bump, commit, tagvX.Y.Z, push. The release workflow then publishes to npm and creates the GitHub release. - Afterwards move the moving tag locally:
npm run tag-majorsetsvX.Yto this release and pushes it toorigin. Tags are never created in a workflow. With Gitea as source, see Gitea as source for the mirror details. - Extension repositories pin two refs: the npm package (
@^X.Yin theirpackage.jsonscripts) and the reusable workflows (@vX.Yin theirci.yml/release.yml). A patch release reaches them after the tag move; a minor release is a deliberate update - after a0.2.0release, update the pins in the affected repositories. - Workflows can be changed without touching the extensions: the tag move is what
delivers the change. Watch the first run after a change
(
publishjob of the tag build). - Changes that require new placeholders in
template/must also updatetooling/scaffold.mjs;npm run check(self-test) fails otherwise.
Changelog
Notable changes per version are documented in CHANGELOG.md.
0.1.7 - 2026-10-13
Changed
- New extensions are set up for npm trusted publishing: no
NPM_TOKENsecret, a Trusted Publisher on npmjs.com instead. Existing token setups keep working.
Full history and all versions: CHANGELOG.md