- Clone the repository
- Install dependencies:
npm install - Build:
npm run build - Run the demo:
npm run dev
- Create a branch from
main - Make your changes in
src/ - Verify the build passes:
npm run build - Open a pull request against
main
The Build workflow runs on every push and pull request to verify the build passes before merge.
Releases happen automatically when a pull request is merged into main:
- The
Publishworkflow triggers on push tomain - The patch version is bumped automatically via
npm version patch - The package is rebuilt and the version commit + git tag are pushed back to
main - The package is published to npm via npm Trusted Publishers — no stored npm token required
A release can also be triggered manually from the Actions tab using the Run workflow button. This is useful if the automatic publish failed and needs to be retried.
The automated workflow only does patch bumps. For a minor or major release, bump the version manually before opening your PR:
npm version minor
# or
npm version major
Then push the version commit. The publish workflow will skip its own npm version patch if the version was already bumped (the git commit || true is a no-op when there is nothing new to commit).
If you fork this or create a similar package, configure npm Trusted Publishers on the package page at npmjs.com:
- Publisher: GitHub Actions
- Repository owner:
wezz - Repository name:
FetchManager - Workflow filename:
publish.yml
This replaces the need for a stored NODE_AUTH_TOKEN secret entirely.