Appearance
Release Workflow
This guide documents the maintained release path for the scoped ESM-only package, @shbernal/pptxgenjs.
Publishing is automated by .github/workflows/publish.yml. The workflow runs when a GitHub Release is published and can also be dispatched manually from a matching tag as a retry path.
Release Prerequisites
- The npm package is
@shbernal/pptxgenjs. package.json#repository.urlpoints atshbernal/PptxGenJS.- npm trusted publishing is configured for:
- package:
@shbernal/pptxgenjs - GitHub repository:
shbernal/PptxGenJS - workflow filename:
publish.yml - GitHub environment:
npm-publish - allowed action:
npm publish
- package:
- The GitHub Environment
npm-publishexists before the first automated release. - Do not add an
NPM_TOKENsecret for the normal path. The workflow uses OIDC withid-token: write.
Version Updates
- Update
package.jsonversion. - Update
src/pptxgen.tsversion. - Update
CHANGELOG.mdwith the release date and summary. - Update demo package versions when they intentionally track the release version.
- Keep package import examples on the scoped package name:
@shbernal/pptxgenjs.
Local Release Gate
Install dependencies and the OOXML validator:
bash
pnpm install --frozen-lockfile
./tools/ooxml-validator/install.shRun the full automated gate before tagging:
bash
pnpm run lint
pnpm run format:check
pnpm run typecheck
pnpm test
pnpm run build
pnpm run package:lint
pnpm run pack:check
pnpm run test:package
pnpm run test:demos
npm pack --dry-run --ignore-scriptsCheck that the target version is not already published:
bash
npm view @shbernal/pptxgenjs@X.Y.Z versionThe command should fail with a registry 404 for a new release version.
Automated npm Publish
- Merge the release commit into
mainline. - Create a tag named exactly
vX.Y.Z, matchingpackage.json#version. - Push
mainlineand the tag. - Create a GitHub Release from
vX.Y.Z. - Publish the GitHub Release.
Publishing the GitHub Release starts .github/workflows/publish.yml. The workflow:
- refuses to run outside
shbernal/PptxGenJS - refuses branch publishes;
GITHUB_REF_TYPEmust betag - requires the tag name to equal
v${package.json#version} - checks that
@shbernal/pptxgenjs@X.Y.Zis unpublished - installs with
pnpm install --frozen-lockfile - installs the OOXML validator
- runs lint, formatting, typecheck, tests, package checks, package smoke tests, demo smoke tests, and
npm pack --dry-run --ignore-scripts - publishes with
npm publish --access public --provenance --ignore-scripts
npm trusted publishing automatically exchanges the GitHub Actions OIDC token for publish credentials. The explicit --provenance flag keeps provenance required even if npm defaults change.
Manual Workflow Retry
Use this only after fixing a failed publish workflow without changing the release artifact:
bash
gh workflow run publish.yml --repo shbernal/PptxGenJS --ref vX.Y.ZThe selected ref must be the release tag, not mainline.
Post-Publish Checks
Verify npm and GitHub agree on the release:
bash
npm view @shbernal/pptxgenjs@X.Y.Z version dist-tags --json
gh release view vX.Y.Z --repo shbernal/PptxGenJSPackage Surface Checks
The package should ship:
dist/index.jsdist/index.d.tsdist/core.jsdist/node.jsdist/browser.jsdist/standalone.js- package
exports["."].default - package
exports["."].types - package subpaths for
./core,./node,./browser, and./standalone - scoped imports for
@shbernal/pptxgenjs,@shbernal/pptxgenjs/core,@shbernal/pptxgenjs/node,@shbernal/pptxgenjs/browser, and@shbernal/pptxgenjs/standalone
The package should not ship or document:
- CommonJS support
- IIFE/global browser bundle support
- direct CDN script-tag support as a maintained workflow
types/src/bld/dist/pptxgen.cjs.jsdist/pptxgen.jsdist/pptxgen.es.jsdist/pptxgen.bundle.jsdist/pptxgen.min.js