docs: update release process for automated npm publishing#229
Conversation
- RELEASE.md: replace manual publish.sh with automated GitHub release flow - RELEASE.md: add npm Trusted Publisher setup docs and troubleshooting - RELEASE.md: add step to update CLAUDE.md during releases - CLAUDE.md: document publish.yml workflow and OIDC publishing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR updates Key changes:
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| RELEASE.md | Replaces manual publish script with automated gh release create flow; well-structured with clear steps, but the repository name casing in the npm Trusted Publisher setup section (Purchasely-ReactNative) may not match the actual GitHub repo path and could cause OIDC publish failures. |
| CLAUDE.md | CI/CD section updated to add workflow table and document the new publish.yml; accurately removes the standalone build-library job (now embedded in build-android/build-ios steps) and correctly describes OIDC flow and bare-version tag requirement. |
Sequence Diagram
sequenceDiagram
participant Dev as Developer
participant GH as GitHub
participant CI as ci.yml
participant PUB as publish.yml
participant NPM as npmjs.com
Dev->>GH: gh pr create (version/{VERSION} → main)
GH->>CI: trigger on pull_request
CI-->>GH: lint / test / build-android / build-ios ✓
Dev->>GH: gh pr merge --merge
Dev->>GH: gh release create {VERSION} --target main
GH->>PUB: trigger on release (published)
PUB->>CI: workflow_call (full CI)
CI-->>PUB: all jobs pass ✓
PUB->>PUB: verify all package.json versions == {VERSION}
PUB->>NPM: npm publish --provenance (×5 packages) via OIDC
NPM-->>Dev: packages live at {VERSION}
Dev->>NPM: npm view <package> version (verify)
Prompt To Fix All With AI
This is a comment left during a code review.
Path: RELEASE.md
Line: 191-193
Comment:
**Repository name casing may not match actual GitHub repo**
The npm Trusted Publisher setup instructs users to enter `Purchasely-ReactNative` as the repository name, and the troubleshooting section also refers to `Purchasely/Purchasely-ReactNative`. However, the repository URL used throughout the PR metadata and in OIDC tokens issued by GitHub Actions is `purchasely/purchasely-reactnative` (all lowercase).
npm's Trusted Publisher verification uses the OIDC token's `repository` claim, which GitHub sets from the actual repository path. If the case doesn't match exactly what was configured on npmjs.com, every publish attempt will fail with the "forbidden" or OIDC error described in the troubleshooting section below.
Please verify the exact case of the repository name as it appears on `github.com` and ensure the npm Trusted Publisher configuration (and the troubleshooting note at line 223) uses the correct casing.
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: RELEASE.md
Line: 119
Comment:
**`gh pr merge` strategy may conflict with branch protection rules**
The `--merge` flag creates a merge commit. If the repository's branch protection rules require squash merges (a common setting for a clean `main` history), this command will fail. Consider documenting the expected merge strategy or using `--squash` if that is the project convention.
```suggestion
gh pr merge --squash
```
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: e6dc1df
| 3. Repository name: `Purchasely-ReactNative` | ||
| 4. Workflow filename: `publish.yml` | ||
| 5. Environment: *(leave empty)* |
There was a problem hiding this comment.
Repository name casing may not match actual GitHub repo
The npm Trusted Publisher setup instructs users to enter Purchasely-ReactNative as the repository name, and the troubleshooting section also refers to Purchasely/Purchasely-ReactNative. However, the repository URL used throughout the PR metadata and in OIDC tokens issued by GitHub Actions is purchasely/purchasely-reactnative (all lowercase).
npm's Trusted Publisher verification uses the OIDC token's repository claim, which GitHub sets from the actual repository path. If the case doesn't match exactly what was configured on npmjs.com, every publish attempt will fail with the "forbidden" or OIDC error described in the troubleshooting section below.
Please verify the exact case of the repository name as it appears on github.com and ensure the npm Trusted Publisher configuration (and the troubleshooting note at line 223) uses the correct casing.
Prompt To Fix With AI
This is a comment left during a code review.
Path: RELEASE.md
Line: 191-193
Comment:
**Repository name casing may not match actual GitHub repo**
The npm Trusted Publisher setup instructs users to enter `Purchasely-ReactNative` as the repository name, and the troubleshooting section also refers to `Purchasely/Purchasely-ReactNative`. However, the repository URL used throughout the PR metadata and in OIDC tokens issued by GitHub Actions is `purchasely/purchasely-reactnative` (all lowercase).
npm's Trusted Publisher verification uses the OIDC token's `repository` claim, which GitHub sets from the actual repository path. If the case doesn't match exactly what was configured on npmjs.com, every publish attempt will fail with the "forbidden" or OIDC error described in the troubleshooting section below.
Please verify the exact case of the repository name as it appears on `github.com` and ensure the npm Trusted Publisher configuration (and the troubleshooting note at line 223) uses the correct casing.
How can I resolve this? If you propose a fix, please make it concise.|
|
||
| After CI passes and PR is approved: | ||
| ```bash | ||
| gh pr merge --merge |
There was a problem hiding this comment.
gh pr merge strategy may conflict with branch protection rules
The --merge flag creates a merge commit. If the repository's branch protection rules require squash merges (a common setting for a clean main history), this command will fail. Consider documenting the expected merge strategy or using --squash if that is the project convention.
| gh pr merge --merge | |
| gh pr merge --squash |
Prompt To Fix With AI
This is a comment left during a code review.
Path: RELEASE.md
Line: 119
Comment:
**`gh pr merge` strategy may conflict with branch protection rules**
The `--merge` flag creates a merge commit. If the repository's branch protection rules require squash merges (a common setting for a clean `main` history), this command will fail. Consider documenting the expected merge strategy or using `--squash` if that is the project convention.
```suggestion
gh pr merge --squash
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Key changes
RELEASE.md:
./publish.sh(step 12) withgh release createwhich triggers CI + publish automaticallyCLAUDE.md:
vprefix)Test plan
🤖 Generated with Claude Code