Publishing is now automated via GitHub Actions. Simply:
- Update version in
package.jsonandsrc/version.ts - Update
CHANGELOG.md - Commit and push to
main - Create a GitHub Release with the version tag
The .github/workflows/publish.yml workflow will:
- Run tests
- Build ESM + CJS
- Publish to npm with provenance
- Version bumped in
package.jsonandsrc/version.ts - CHANGELOG.md updated
- All tests passing (185+)
- TypeScript compilation successful
- ESLint passes (
npm run lint)
# 1. Verify clean state
git status
npm test
npm run lint
npm run build
# 2. Check package contents
npm pack --dry-run
# 3. Publish
npm publish
# 4. Tag and push
git tag -a vX.Y.Z -m "Release vX.Y.Z"
git push origin vX.Y.Z
# 5. Create GitHub Release at:
# https://github.com/OilpriceAPI/oilpriceapi-node/releases/newnpm view oilpriceapi versions
npm install oilpriceapi@latestnpm deprecate oilpriceapi@X.Y.Z "Use X.Y.Z+1 instead"