Skip to content

Commit 87d038c

Browse files
bm1549claude
andauthored
docs: add RELEASING.md (#29)
* docs: add RELEASING.md Document the manual release process so any maintainer can cut a release without needing to ask. Linked from the README. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Apply suggestion from @bm1549 * chore: add markdown files to .npmignore Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Apply suggestion from @bm1549 --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 4edfca2 commit 87d038c

3 files changed

Lines changed: 51 additions & 0 deletions

File tree

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ test.sh
44
limitation.js
55
eslint*
66
*.sw?
7+
*.md

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ const diagnostics_channel = require('dc-polyfill');
4040
When a Pull Request is created the test suite runs against dozens of versions of Node.js. Notably, versions right before a change and versions right after a change, the first version of a release line, and the last version of a release line. To test locally it's recommended to use a node version management tool, such as `nvm`, to test changes with.
4141

4242

43+
## Releasing
44+
45+
See [RELEASING.md](RELEASING.md) for the steps to publish a new version of `dc-polyfill` to npm.
46+
47+
4348
## License / Copyright
4449

4550
See [LICENSE.txt](LICENSE.txt) for full details.

RELEASING.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Releasing
2+
3+
`dc-polyfill` is published to npm as [`dc-polyfill`](https://www.npmjs.com/package/dc-polyfill). Releases are currently cut manually by a maintainer with publish access to the package on npm.
4+
5+
## Prerequisites
6+
7+
- Push access to `main` on this repository.
8+
- The [`gh`](https://cli.github.com/) CLI, authenticated against `DataDog/dc-polyfill`.
9+
- Log in to the npm account with publish access to `dc-polyfill`. Check with `npm whoami`; run `npm login` if needed. If you don't have publish access, ask an existing maintainer.
10+
11+
## Cutting a release
12+
13+
```sh
14+
# Make sure main is green and up to date.
15+
git checkout main
16+
git pull origin main
17+
18+
# Bump the version. Pick patch, minor, or major per semver.
19+
# This updates package.json, creates a commit (e.g. "0.1.11"),
20+
# and creates a matching v0.1.11 tag locally.
21+
npm version patch
22+
23+
# Sanity-check what will be packed before publishing anything public.
24+
npm publish --dry-run
25+
26+
# Publish to npm. Do this before pushing the tag so a failed publish
27+
# doesn't leave a release tag in the repo that points at no npm version.
28+
npm publish
29+
30+
# Push the version-bump commit and the tag.
31+
git push origin main --follow-tags
32+
33+
# Create the GitHub release with autogenerated notes.
34+
gh release create "v$(node -p "require('./package.json').version")" --generate-notes
35+
```
36+
37+
## Verifying the release
38+
39+
```sh
40+
# Confirm the new version is live on npm.
41+
npm view dc-polyfill version
42+
43+
# Confirm the GitHub release exists.
44+
gh release view "v$(node -p "require('./package.json').version")"
45+
```

0 commit comments

Comments
 (0)