@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.
Files changed (2) hide show
  1. package/docs/PUBLISHING.md +33 -21
  2. package/package.json +1 -1
@@ -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
- 1. Ensure you are logged into npm as `marcohefti` with publish access and 2FA enabled:
36
- ```bash
37
- npm login
38
- ```
39
- 2. From the contracts package root, run the verifier:
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
- git tag v<version>
52
- git push
53
- git push --tags
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
- 5. Publish the package to npm:
45
+
46
+ 2. Push the tag to GitHub:
56
47
  ```bash
57
- npm publish --access public --otp=<your_2fa_code>
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marcohefti/request-network-api-contracts",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "private": false,
5
5
  "description": "Shared contracts for Request Network API clients (OpenAPI spec, webhook fixtures).",
6
6
  "license": "MIT",