You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,38 @@ bun run format
61
61
62
62
5. Never commit directly to `main`.
63
63
64
+
## Release Publishing
65
+
66
+
Tokenleak publishes to npm from GitHub Actions with npm Trusted Publishing. The publish workflow does not store an npm token and does not run for pull requests.
67
+
68
+
Configure the package once from an npm account with publish access:
Use these trusted publisher fields if configuring in npmjs.com instead:
75
+
76
+
- Provider: GitHub Actions
77
+
- Organization or user: `ya-nsh`
78
+
- Repository: `tokenleak`
79
+
- Workflow file: `publish-npm.yml`
80
+
- Environment: `npm-publish`
81
+
- Allowed action: `npm publish`
82
+
83
+
After a release PR is merged and the version is ready, publish with one of:
84
+
85
+
```bash
86
+
# Manual release from the default branch
87
+
gh workflow run publish-npm.yml --ref main
88
+
89
+
# Tag-triggered release
90
+
git tag v<version>
91
+
git push origin v<version>
92
+
```
93
+
94
+
Only users with write access to the repository can manually trigger the workflow or push release tags. Forks and pull requests cannot publish because the workflow has no `pull_request` trigger, and the publish job is restricted to `ya-nsh/tokenleak` on `main` or `v*` tags.
95
+
64
96
## Code Style
65
97
66
98
-**Strict TypeScript**: No `any` types. Use `unknown` and narrow properly.
0 commit comments