port: emit publish workflow into omp repos (independent npm releases)
All checks were successful
port-to-omp / port (push) Successful in 4s
All checks were successful
port-to-omp / port (push) Successful in 4s
This commit is contained in:
@@ -218,6 +218,11 @@ omp install @mikefreno/omp-pygienium
|
|||||||
This is the omp port of [Mike/pygienium](https://git.freno.me/Mike/pygienium), regenerated automatically from the source repo. See the source repo for full documentation.
|
This is the omp port of [Mike/pygienium](https://git.freno.me/Mike/pygienium), regenerated automatically from the source repo. See the source repo for full documentation.
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
||||||
|
// publish workflow emitted into the port repo so the omp package can be
|
||||||
|
// released independently (tag push or manual dispatch on the omp repo).
|
||||||
|
const PORT_PUBLISH_WORKFLOW = "name: publish\n\n# Publish this omp port package to the npm registry on version tags.\n#\n# Prerequisites:\n# - npm automation token (publish scope) stored as the repo secret NPM_TOKEN\n# - package name claimed on npm (@mikefreno/omp-<name>)\n#\n# Manual publish: Actions tab → Run workflow (workflow_dispatch).\n\non:\n push:\n tags: ['v*']\n workflow_dispatch:\n\njobs:\n publish:\n runs-on: ubuntu-latest\n steps:\n - name: Checkout\n uses: actions/checkout@v4\n\n - name: Setup node (npm registry auth)\n uses: actions/setup-node@v4\n with:\n node-version: '22'\n registry-url: 'https://registry.npmjs.org'\n\n - name: Publish\n env:\n NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}\n run: npm publish --access public --ignore-scripts\n";
|
||||||
|
|
||||||
const FILE_RULES = {
|
const FILE_RULES = {
|
||||||
"src/index.ts": [
|
"src/index.ts": [
|
||||||
{ from: " * Read the pygienium chat style from pi's settings.json.", to: " * Read the pygienium chat style from omp's settings.json." },
|
{ from: " * Read the pygienium chat style from pi's settings.json.", to: " * Read the pygienium chat style from omp's settings.json." },
|
||||||
@@ -322,6 +327,10 @@ function portExtension() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
writeFileSync(join(dstDir, "tsconfig.json"), PYGENIUM_TSCONFIG);
|
writeFileSync(join(dstDir, "tsconfig.json"), PYGENIUM_TSCONFIG);
|
||||||
|
const wfDir = join(dstDir, ".gitea", "workflows");
|
||||||
|
mkdirSync(wfDir, { recursive: true });
|
||||||
|
writeFileSync(join(wfDir, "publish.yml"), PORT_PUBLISH_WORKFLOW);
|
||||||
|
|
||||||
console.log("== bun install (regenerates bun.lock + node_modules)");
|
console.log("== bun install (regenerates bun.lock + node_modules)");
|
||||||
execSync("bun install", { cwd: dstDir, stdio: "inherit" });
|
execSync("bun install", { cwd: dstDir, stdio: "inherit" });
|
||||||
console.log("== done");
|
console.log("== done");
|
||||||
|
|||||||
Reference in New Issue
Block a user