@ahmedsamirelsaka/react-native-local-release 2.0.0-rc.1 → 2.0.0-rc.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/CHANGELOG.md +6 -1
- package/README.md +4 -4
- package/package.json +1 -1
- package/docs/PUBLISHING.md +0 -128
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.0.0-rc.2
|
|
4
|
+
|
|
5
|
+
- Remove maintainer-only `docs/PUBLISHING.md` from the published package and GitHub tree.
|
|
6
|
+
- README / docs scrubbed for public launch (no local paths or token-setup checklists).
|
|
7
|
+
|
|
3
8
|
## 2.0.0-rc.1
|
|
4
9
|
|
|
5
10
|
Security-first rewrite for bare React Native apps (release candidate).
|
|
@@ -23,7 +28,7 @@ Security-first rewrite for bare React Native apps (release candidate).
|
|
|
23
28
|
- CI: SHA-pinned actions, npm provenance publish workflow, Dependabot.
|
|
24
29
|
|
|
25
30
|
### Migration
|
|
26
|
-
1. Install `2.0.0-rc.
|
|
31
|
+
1. Install `2.0.0-rc.2` (or newer) from npm (dist-tag `next`).
|
|
27
32
|
2. Run `rn-local-release migrate --project .` (or reinstall; existing config is merged).
|
|
28
33
|
3. Prefer Keychain credentials: `rn-local-release configure --project .`
|
|
29
34
|
4. Confirm `.gitignore` includes `logs/`, `versions/`, and the marked credential block.
|
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Security-first local Fastlane release toolkit for **bare** React Native apps (iOS + Android).
|
|
4
4
|
|
|
5
|
-
Package: `@ahmedsamirelsaka/react-native-local-release`
|
|
6
|
-
Version: **2.0.0-rc.
|
|
5
|
+
Package: [`@ahmedsamirelsaka/react-native-local-release`](https://www.npmjs.com/package/@ahmedsamirelsaka/react-native-local-release)
|
|
6
|
+
Version: **2.0.0-rc.2** (npm dist-tag `next`)
|
|
7
7
|
|
|
8
8
|
## Supported
|
|
9
9
|
|
|
@@ -22,10 +22,10 @@ Version: **2.0.0-rc.1** (GitHub Release ready; npm `next` tag after you add `NPM
|
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
24
|
# From your React Native app root
|
|
25
|
-
npx @ahmedsamirelsaka/react-native-local-release@2.0.0-rc.
|
|
25
|
+
npx @ahmedsamirelsaka/react-native-local-release@2.0.0-rc.2 install --project .
|
|
26
26
|
|
|
27
27
|
# Prefer an exact version in package.json so daily commands do not float:
|
|
28
|
-
# "devDependencies": { "@ahmedsamirelsaka/react-native-local-release": "2.0.0-rc.
|
|
28
|
+
# "devDependencies": { "@ahmedsamirelsaka/react-native-local-release": "2.0.0-rc.2" }
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
Useful flags:
|
package/package.json
CHANGED
package/docs/PUBLISHING.md
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# Publishing to npm (`@ahmedsamirelsaka/react-native-local-release`)
|
|
2
|
-
|
|
3
|
-
CI and GitHub Releases already work. npm publish fails with **`ENEEDAUTH`** until **you** add registry credentials. This cannot be done by the CI bot alone.
|
|
4
|
-
|
|
5
|
-
Choose **Path A** (fastest) or **Path B** (OIDC, no long-lived token).
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Path A — Automation token (recommended for first publish)
|
|
10
|
-
|
|
11
|
-
### 1. Create / sign in to npm
|
|
12
|
-
|
|
13
|
-
1. Open https://www.npmjs.com/signup (or https://www.npmjs.com/login).
|
|
14
|
-
2. Prefer username **`ahmedsamirelsaka`** so the scope `@ahmedsamirelsaka` matches the package name.
|
|
15
|
-
If you already use another username, either:
|
|
16
|
-
- change `package.json` `"name"` to `@YOUR_NPM_USER/react-native-local-release`, or
|
|
17
|
-
- create an npm **Organization** named `ahmedsamirelsaka` and add yourself as owner.
|
|
18
|
-
|
|
19
|
-
### 2. Enable 2FA (required for publishing)
|
|
20
|
-
|
|
21
|
-
npm → **Account** → **Access Tokens** / Security → enable 2FA (auth-and-writes or auth-only + granular tokens).
|
|
22
|
-
|
|
23
|
-
### 3. Create an Automation token
|
|
24
|
-
|
|
25
|
-
1. https://www.npmjs.com/settings/~/tokens
|
|
26
|
-
(or Organization → Access Tokens if publishing under an org)
|
|
27
|
-
2. **Generate New Token** → **Granular Access Token** (preferred) or classic **Automation**.
|
|
28
|
-
3. Settings that work:
|
|
29
|
-
- **Type:** Automation (classic) **or** Granular with permission **Read and write** on packages
|
|
30
|
-
- **Packages:** allow `@ahmedsamirelsaka/react-native-local-release` (or entire `@ahmedsamirelsaka` scope)
|
|
31
|
-
- **Organizations:** your org if applicable
|
|
32
|
-
4. Copy the token once (`npm_…`). Store it in a password manager.
|
|
33
|
-
|
|
34
|
-
### 4. Add the token to GitHub
|
|
35
|
-
|
|
36
|
-
**Option 1 — Environment secret (matches the workflow):**
|
|
37
|
-
|
|
38
|
-
1. https://github.com/AhmedSamirElsaka/react-native-local-release/settings/environments
|
|
39
|
-
2. Open environment **`npm-publish`** (already created).
|
|
40
|
-
3. **Environment secrets** → **Add secret**
|
|
41
|
-
- Name: `NPM_TOKEN`
|
|
42
|
-
- Value: paste the npm token
|
|
43
|
-
|
|
44
|
-
**Option 2 — Repository secret:**
|
|
45
|
-
|
|
46
|
-
1. https://github.com/AhmedSamirElsaka/react-native-local-release/settings/secrets/actions
|
|
47
|
-
2. **New repository secret** → `NPM_TOKEN` → paste token
|
|
48
|
-
|
|
49
|
-
> The workflow reads `${{ secrets.NPM_TOKEN }}`. Environment secrets are visible only to jobs that use `environment: npm-publish` (this one does).
|
|
50
|
-
|
|
51
|
-
### 5. Re-run publish
|
|
52
|
-
|
|
53
|
-
Either:
|
|
54
|
-
|
|
55
|
-
- Actions → failed **Publish npm + GitHub Release assets** run → **Re-run failed jobs**
|
|
56
|
-
|
|
57
|
-
Or from a terminal:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
cd /Users/ahmedsamir/work/react-native-local-release
|
|
61
|
-
git push origin :refs/tags/v2.0.0-rc.1
|
|
62
|
-
git tag -f -a v2.0.0-rc.1 -m "2.0.0-rc.1"
|
|
63
|
-
git push origin v2.0.0-rc.1
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### 6. Verify
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
npm view @ahmedsamirelsaka/react-native-local-release version --tag next
|
|
70
|
-
npx @ahmedsamirelsaka/react-native-local-release@next --help
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
RC is published under dist-tag **`next`** (not `latest`) until you cut a stable `2.0.0`.
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## Path B — Trusted Publishing (OIDC, no `NPM_TOKEN`)
|
|
78
|
-
|
|
79
|
-
Best after the package exists once, or if npm allows first-time trusted publish for your account.
|
|
80
|
-
|
|
81
|
-
1. Publish **once** with Path A (creates the package), **or** follow npm’s current “Trusted Publisher” UI for new packages.
|
|
82
|
-
2. Open the package on npm → **Settings** → **Trusted Publisher** / **Provenance**:
|
|
83
|
-
- **Repository:** `AhmedSamirElsaka/react-native-local-release`
|
|
84
|
-
- **Workflow:** `publish.yml` (file under `.github/workflows/publish.yml`)
|
|
85
|
-
- **Environment:** `npm-publish`
|
|
86
|
-
3. Remove `NPM_TOKEN` later if you want OIDC-only.
|
|
87
|
-
4. Re-run the tag workflow. Job already has `permissions.id-token: write`.
|
|
88
|
-
|
|
89
|
-
Docs: https://docs.npmjs.com/trusted-publishers
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## Optional: publish once from your laptop
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
cd /Users/ahmedsamir/work/react-native-local-release
|
|
97
|
-
npm login # or: npm login --auth-type=web
|
|
98
|
-
npm whoami
|
|
99
|
-
npm test
|
|
100
|
-
npm publish --access public --tag next --provenance
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Use the same version already in `package.json` (`2.0.0-rc.1`). Do **not** re-publish the same version if CI already succeeded.
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Checklist
|
|
108
|
-
|
|
109
|
-
| Step | Status |
|
|
110
|
-
|------|--------|
|
|
111
|
-
| CI green on `main` | Done by repo |
|
|
112
|
-
| GitHub Release `v2.0.0-rc.1` + tarball | Done |
|
|
113
|
-
| npm account + `@ahmedsamirelsaka` scope | **You** |
|
|
114
|
-
| `NPM_TOKEN` on `npm-publish` env (or Trusted Publisher) | **You** |
|
|
115
|
-
| Re-run publish workflow | **You** |
|
|
116
|
-
| `npm view …@next` works | Confirm |
|
|
117
|
-
|
|
118
|
-
---
|
|
119
|
-
|
|
120
|
-
## After it works
|
|
121
|
-
|
|
122
|
-
Consumers:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
npx @ahmedsamirelsaka/react-native-local-release@next install --project .
|
|
126
|
-
# or pin exactly:
|
|
127
|
-
npm i -D @ahmedsamirelsaka/react-native-local-release@2.0.0-rc.1
|
|
128
|
-
```
|