@bikdotai/bik-widgets 1.0.11 → 1.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 +64 -0
- package/dist-package/index.cjs +1 -1
- package/dist-package/index.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,67 @@
|
|
|
1
|
+
## Release Guide
|
|
2
|
+
|
|
3
|
+
### NPM Package (`@bikdotai/bik-widgets`)
|
|
4
|
+
|
|
5
|
+
The package is published to npm under the `@bikdotai` scope. The `prepublishOnly` script automatically runs a clean build before publishing.
|
|
6
|
+
|
|
7
|
+
#### Beta Release
|
|
8
|
+
|
|
9
|
+
1. Bump the version in `package.json` to the desired beta version (e.g. `1.0.12-beta.1`).
|
|
10
|
+
2. Run:
|
|
11
|
+
```bash
|
|
12
|
+
npm publish --tag beta
|
|
13
|
+
```
|
|
14
|
+
Consumers install it with `npm install @bikdotai/bik-widgets@beta`.
|
|
15
|
+
|
|
16
|
+
#### Production Release
|
|
17
|
+
|
|
18
|
+
1. Bump the version in `package.json` to a stable semver (e.g. `1.0.12`).
|
|
19
|
+
2. Run:
|
|
20
|
+
```bash
|
|
21
|
+
npm publish
|
|
22
|
+
```
|
|
23
|
+
This publishes to the `latest` tag.
|
|
24
|
+
|
|
25
|
+
> **Note:** An `NPM_TOKEN` secret must be configured in the repository for CI-based publishing.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
### Widget Assets (GCS Bucket Deploy)
|
|
30
|
+
|
|
31
|
+
Widget JS files are deployed to Google Cloud Storage via GitHub Actions. Deployments are triggered by **adding a label to a pull request** — no manual `gsutil` commands are needed.
|
|
32
|
+
|
|
33
|
+
#### Staging Deploy
|
|
34
|
+
|
|
35
|
+
1. Open (or use an existing) pull request targeting any branch.
|
|
36
|
+
2. Add the label **`build:stage`** to the PR.
|
|
37
|
+
3. The CI pipeline will:
|
|
38
|
+
- Build widgets with `npm run build-widgets` (public path: `https://api.staging.bik.ai/bik-widgets/bap/`)
|
|
39
|
+
- Upload each widget JS file to `gs://bik-widget-mfe/bap/`
|
|
40
|
+
|
|
41
|
+
#### Production Deploy
|
|
42
|
+
|
|
43
|
+
1. Open (or use an existing) pull request.
|
|
44
|
+
2. Add the label **`build:prod`** to the PR.
|
|
45
|
+
3. The CI pipeline will:
|
|
46
|
+
- Build widgets with `npm run build-widgets-prod` (public path: `https://bikapi.bikayi.app/assets/bap/`)
|
|
47
|
+
- Upload each widget JS file to `gs://bik-assets/bap/`
|
|
48
|
+
|
|
49
|
+
#### Running Staging Tests Only
|
|
50
|
+
|
|
51
|
+
Add the label **`test:stage`** to a PR to run Cypress end-to-end tests against staging without triggering a build.
|
|
52
|
+
|
|
53
|
+
#### Label Summary
|
|
54
|
+
|
|
55
|
+
| Label | What it does |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `build:stage` | Build + deploy widgets & MFE to **staging** GCS bucket |
|
|
58
|
+
| `build:prod` | Build + deploy widgets & MFE to **production** GCS bucket |
|
|
59
|
+
| `test:stage` | Run Cypress E2E tests against staging |
|
|
60
|
+
|
|
61
|
+
> **Note:** The `GCP_SERVICE_ACCOUNT_JSON` secret must be configured in GitHub Actions for bucket uploads to succeed.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
1
65
|
### Deploying mfe assets to bucket automatically
|
|
2
66
|
|
|
3
67
|
Follow below steps
|