ScriptAPI addon template generated by scriptup.
- package/main.ts: local package source
- src/main.ts: sample usage that imports from ScriptBoxMC
npm install- Update
nameandversionin package.json (current import alias:ScriptBoxMC). - Build and publish:
npm run build
npm publish --access publicTip
Using npm Trusted Publishers removes the need to manage NPM_TOKEN in GitHub secrets.
-
On npmjs.com, open your package → Settings → Trusted Publishers.
-
Add a trusted publisher:
- GitHub Actions as the provider
- Organization or user: Enter your GitHub username or organization name
- Repository: Enter the repository name where the package is located
- Workflow filename:
publish.yml - Environment name: Keep empty
-
Once configured, delete the
NPM_TOKENsecret from GitHub repository settings (not needed anymore). -
Bump
versionin package.json, then create a GitHub release → .github/workflows/publish.yml runs automatically.