Skip to content

Commit 8a8f6a4

Browse files
committed
update readme with publishing info
1 parent d4892ad commit 8a8f6a4

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.pyc
22
.DS_Store
3+
.vscode
34
node_modules
45
third_party/package.json
56

PUBLISHING.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# PUBLISHING
2+
3+
node-webgpu is auto published via github actions to npm whenever a tag
4+
is pushed to the repository.
5+
6+
The steps in general are:
7+
8+
```bash
9+
git remote add upstream git@github.com/dawn-gpu/node-webgpu.git
10+
# update the repo
11+
# run the tests
12+
npm version patch # or minor or major
13+
git push --tag upstream main
14+
```
15+
16+
That should build all 3 platforms and then publish a new package
17+
on npm. At the time of this writing that generally takes 20-30 minutes.
18+
19+
## Notes
20+
21+
### No tests on CQ
22+
23+
github actions doesn't currently run any tests as there is no GPU
24+
so run tests locally before pushing the patch.
25+
26+
### npm permissions
27+
28+
The github action publishes to npm via the `JS-DevTools/npm-publish`
29+
action. See `.github/workflows/build.yml`. This uses github
30+
secret named `NPM_TOKEN` which is stored and unrecoverable in
31+
the repo's settings. To change it, an admin of this project,
32+
and of the npm project would go to npm, generate a new token,
33+
then copy it into the github settings for this project.
34+
35+
* getting a token for npm: https://docs.npmjs.com/creating-and-viewing-access-tokens
36+
* adding secret to github: https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ And you must have `node.js` installed, at least version 18.
220220
I recommend using [nvm](https://github.com/nvm-sh/nvm) to install it
221221
as it makes it easy to switch versions.
222222

223+
## Publishing
224+
225+
See [PUBLISHING.md](PUBLISHNG.md).
226+
223227
## License
224228

225229
MIT: https://dawn.googlesource.com/dawn/+/HEAD/LICENSE

0 commit comments

Comments
 (0)