@@ -183,6 +183,67 @@ As an alternative, you can pass `prerenderServiceUrl` in the options object duri
183183app .use (require (' prerender-node' ).set (' prerenderServiceUrl' , ' <new url>' ));
184184```
185185
186+ ## Publishing
187+
188+ This package uses npm Trusted Publisher with GitHub Actions for secure, automated publishing.
189+
190+ ### Setup
191+
192+ 1 . ** npm Trusted Publisher** : Configured with OpenID Connect (OIDC) for secure publishing without storing npm tokens
193+ - Publisher: GitHub Actions
194+ - Organization: prerender
195+ - Repository: prerender-node
196+ - Workflow: ` publish.yml `
197+ - Environment: ` npm-publish `
198+
199+ 2 . ** GitHub Environment** : The ` npm-publish ` environment is configured with required reviewers for additional security
200+
201+ ### Publishing Process
202+
203+ ** Automatic Publishing** : The workflow automatically publishes to npm when:
204+ - Code is pushed to ` main ` or ` master ` branch
205+ - The version in ` package.json ` is higher than the current published version
206+ - All tests pass
207+
208+ ** Manual Publishing** : Trigger via GitHub Actions "Run workflow" button
209+
210+ ### Workflow Steps
211+
212+ 1 . ** Setup** : Checkout code, install Node.js and dependencies
213+ 2 . ** Test** : Run full test suite including Express 3/4 integration tests
214+ 3 . ** Version Check** : Compare ` package.json ` version with npm registry
215+ 4 . ** Publish** : If version is higher, publish with ` --provenance ` flag for supply chain security
216+
217+ To publish a new version:
218+ 1 . Update version in ` package.json ` using ` npm version [major|minor|patch] `
219+ 2 . Push to master branch
220+ 3 . GitHub Actions will automatically publish if tests pass
221+
222+ ## Security & Maintenance
223+
224+ ### Automated Dependency Updates
225+ This repository uses ** Dependabot** to automatically create pull requests for:
226+ - Security vulnerability fixes
227+ - Dependency updates for the main package
228+ - Test dependencies for Express 3 and Express 4 integration tests
229+ - GitHub Actions workflow updates
230+
231+ Dependabot runs weekly and creates PRs with conventional commit messages:
232+ - ` deps: update package-name from x.x.x to y.y.y ` - Main dependencies
233+ - ` deps(express3-test): update package-name ` - Express 3 test app dependencies
234+ - ` deps(express4-test): update package-name ` - Express 4 test app dependencies
235+ - ` ci: update actions/checkout from v4 to v5 ` - GitHub Actions updates
236+
237+ ### Express Version Support
238+ This middleware is tested against ** Express 3 and Express 4** to ensure compatibility:
239+ - ` test/support/express3/ ` - Express 3.x integration tests
240+ - ` test/support/express4/ ` - Express 4.x integration tests
241+
242+ Both test apps have separate ` package.json ` files with their respective Express versions to verify the middleware works correctly across different Express major versions.
243+
244+ ### Security Policy
245+ For security vulnerabilities, please see our [ Security Policy] ( SECURITY.md ) . Do not report security issues through public GitHub issues.
246+
186247## Contributing
187248
188249We love any contributions! Feel free to create issues, pull requests, or middleware for other languages/frameworks!
0 commit comments