@marcohefti/request-network-api-contracts 0.5.1 → 0.5.2
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/docs/PUBLISHING.md +33 -21
- package/package.json +1 -1
package/docs/PUBLISHING.md
CHANGED
|
@@ -30,33 +30,45 @@ Use this checklist when preparing a release.
|
|
|
30
30
|
- [ ] Tag strategy documented (e.g., `v0.x.y` for contract updates, semantic
|
|
31
31
|
version bumps when contracts introduce breaking changes for SDKs).
|
|
32
32
|
|
|
33
|
-
## Publishing Steps
|
|
33
|
+
## Publishing Steps (Automated via GitHub Actions)
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npm run verify
|
|
42
|
-
```
|
|
43
|
-
3. Bump the version in `package.json` (following SemVer for the contracts line,
|
|
44
|
-
e.g., `0.5.1` for additive changes) and commit:
|
|
45
|
-
```bash
|
|
46
|
-
git add package.json docs/UPDATES.md specs fixtures
|
|
47
|
-
git commit -m "chore(contracts): prepare @marcohefti/request-network-api-contracts@<version>"
|
|
48
|
-
```
|
|
49
|
-
4. Tag the commit and push branch + tag:
|
|
35
|
+
Publishing is fully automated using GitHub Actions and OIDC trusted publishers. No npm tokens required.
|
|
36
|
+
|
|
37
|
+
**To publish a new version:**
|
|
38
|
+
|
|
39
|
+
1. Bump the version using npm:
|
|
50
40
|
```bash
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
npm version patch # for bug fixes (0.5.1 -> 0.5.2)
|
|
42
|
+
npm version minor # for new features (0.5.1 -> 0.6.0)
|
|
43
|
+
npm version major # for breaking changes (0.5.1 -> 1.0.0)
|
|
54
44
|
```
|
|
55
|
-
|
|
45
|
+
|
|
46
|
+
2. Push the tag to GitHub:
|
|
56
47
|
```bash
|
|
57
|
-
|
|
48
|
+
git push --follow-tags
|
|
58
49
|
```
|
|
59
50
|
|
|
51
|
+
3. GitHub Actions automatically:
|
|
52
|
+
- Verifies spec files exist (`node scripts/verify.js`)
|
|
53
|
+
- Publishes to npm using OIDC authentication
|
|
54
|
+
- Generates provenance attestations
|
|
55
|
+
|
|
56
|
+
4. Verify the publish succeeded:
|
|
57
|
+
- Check GitHub Actions: https://github.com/marcohefti/request-network-api-contracts/actions
|
|
58
|
+
- Check npm: https://www.npmjs.com/package/@marcohefti/request-network-api-contracts
|
|
59
|
+
|
|
60
|
+
**Prerequisites:**
|
|
61
|
+
- Trusted publisher configured on npmjs.com (already set up)
|
|
62
|
+
- Workflow file exists: `.github/workflows/publish.yml`
|
|
63
|
+
- Repository uses npm 11.5.1+ in CI
|
|
64
|
+
|
|
65
|
+
**Manual publish (emergency only):**
|
|
66
|
+
If GitHub Actions is unavailable, you can publish manually:
|
|
67
|
+
```bash
|
|
68
|
+
npm login
|
|
69
|
+
npm publish --access public
|
|
70
|
+
```
|
|
71
|
+
|
|
60
72
|
## Post-Release
|
|
61
73
|
|
|
62
74
|
- [ ] Update TypeScript and PHP clients (and any other SDKs) to depend on the
|
package/package.json
CHANGED