@releasekit/publish 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,135 @@
1
+ # @releasekit/publish
2
+
3
+ Publish packages to npm and crates.io with git tagging and GitHub releases.
4
+
5
+ ## Features
6
+
7
+ - **npm publishing** with OIDC provenance support
8
+ - **crates.io publishing** for Rust packages
9
+ - **Git tagging** with customizable tag templates
10
+ - **GitHub releases** with auto-generated notes
11
+ - **Retry logic** for flaky registry operations
12
+ - **Dry-run mode** for safe testing
13
+ - **JSON output** for CI integration
14
+ - **Post-publish verification** to confirm packages are available
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install -g @releasekit/publish
20
+ # or
21
+ pnpm add -g @releasekit/publish
22
+ ```
23
+
24
+ ## Quick Start
25
+
26
+ `@releasekit/publish` reads JSON output from `@releasekit/version` and runs a publish pipeline:
27
+
28
+ ```bash
29
+ # Pipe from version to publish
30
+ releasekit-version --json | releasekit-publish
31
+
32
+ # Or use an input file
33
+ releasekit-version --json > version-output.json
34
+ releasekit-publish --input version-output.json
35
+ ```
36
+
37
+ ## Pipeline Stages
38
+
39
+ The publish pipeline runs in order:
40
+
41
+ 1. **Input** - Parse version JSON from stdin or file
42
+ 2. **Prepare** - Copy files (e.g., LICENSE), update Cargo.toml versions
43
+ 3. **Git Commit** - Create version bump commit
44
+ 4. **Git Tag** - Create git tags for each package
45
+ 5. **npm Publish** - Publish to npm registry
46
+ 6. **Cargo Publish** - Publish to crates.io
47
+ 7. **Verify** - Verify packages are available on registries
48
+ 8. **Git Push** - Push commits and tags to remote
49
+ 9. **GitHub Release** - Create GitHub releases
50
+
51
+ ## CLI Reference
52
+
53
+ | Flag | Description | Default |
54
+ |------|-------------|---------|
55
+ | `--input <path>` | Path to version output JSON | stdin |
56
+ | `--config <path>` | Path to releasekit config | `releasekit.config.json` |
57
+ | `--registry <type>` | Registry to publish to: `npm`, `cargo`, `all` | `all` |
58
+ | `--npm-auth <method>` | NPM auth method: `oidc`, `token`, `auto` | `auto` |
59
+ | `--dry-run` | Simulate all operations | `false` |
60
+ | `--skip-git` | Skip git commit/tag/push | `false` |
61
+ | `--skip-publish` | Skip registry publishing | `false` |
62
+ | `--skip-github-release` | Skip GitHub Release creation | `false` |
63
+ | `--skip-verification` | Skip post-publish verification | `false` |
64
+ | `--json` | Output results as JSON | `false` |
65
+ | `--verbose` | Verbose logging | `false` |
66
+
67
+ ## Integration with @releasekit/version
68
+
69
+ ### Pipe Directly
70
+
71
+ ```bash
72
+ releasekit-version --json --dry-run | releasekit-publish --dry-run
73
+ ```
74
+
75
+ ### Use Output File
76
+
77
+ ```bash
78
+ releasekit-version --json > version-output.json
79
+ releasekit-publish --input version-output.json
80
+ ```
81
+
82
+ ### In CI (GitHub Actions)
83
+
84
+ ```yaml
85
+ - name: Version
86
+ run: releasekit-version --json > version-output.json
87
+
88
+ - name: Publish
89
+ run: releasekit-publish --input version-output.json
90
+ env:
91
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
92
+ ```
93
+
94
+ ## Configuration
95
+
96
+ Configure via `releasekit.config.json`:
97
+
98
+ ```json
99
+ {
100
+ "publish": {
101
+ "npm": {
102
+ "enabled": true,
103
+ "auth": "auto",
104
+ "provenance": true,
105
+ "access": "public",
106
+ "copyFiles": ["LICENSE"]
107
+ },
108
+ "cargo": {
109
+ "enabled": false,
110
+ "noVerify": false
111
+ },
112
+ "githubRelease": {
113
+ "enabled": true,
114
+ "draft": true,
115
+ "generateNotes": true
116
+ },
117
+ "verify": {
118
+ "npm": {
119
+ "maxAttempts": 5,
120
+ "initialDelay": 15000
121
+ },
122
+ "cargo": {
123
+ "maxAttempts": 10,
124
+ "initialDelay": 30000
125
+ }
126
+ }
127
+ }
128
+ }
129
+ ```
130
+
131
+ See [@releasekit/config](../config/README.md) for full configuration options.
132
+
133
+ ## License
134
+
135
+ MIT