bs-widget 1.0.2 → 1.0.4

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/README.md +31 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -10,7 +10,7 @@ Add a container element where the widget should render, include the script, then
10
10
 
11
11
  ```html
12
12
  <div id="bs-widget"></div>
13
- <script src="https://unpkg.com/bs-widget@1.0.1/dist/bundle.js"></script>
13
+ <script src="https://unpkg.com/bs-widget@1.0.2/dist/bundle.js"></script>
14
14
  <script>
15
15
  let widget = new BSWidget({
16
16
  microsite: 6,
@@ -26,9 +26,17 @@ Add a container element where the widget should render, include the script, then
26
26
  You can also use jsDelivr:
27
27
 
28
28
  ```html
29
- <script src="https://cdn.jsdelivr.net/npm/bs-widget@1.0.1/dist/bundle.js"></script>
29
+ <script src="https://cdn.jsdelivr.net/npm/bs-widget@1.0.2/dist/bundle.js"></script>
30
30
  ```
31
31
 
32
+ Alternatively, to always load directly from the `main` branch on GitHub (e.g. for clients with a fixed URL):
33
+
34
+ ```html
35
+ <script src="https://cdn.jsdelivr.net/gh/zoobean/bs-widget/dist/bundle.js"></script>
36
+ ```
37
+
38
+ > **Note:** `dist/bundle.js` is automatically rebuilt and committed to `main` by the `sync-dist` GitHub Actions workflow whenever source files change. If you notice stale content after a release, force a cache refresh by visiting `https://purge.jsdelivr.net/gh/zoobean/bs-widget/dist/bundle.js`.
39
+
32
40
  ### Option B: Local build
33
41
 
34
42
  ```html
@@ -130,4 +138,24 @@ Run all checks before publishing:
130
138
  yarn verify
131
139
  ```
132
140
 
133
- `prepublishOnly` runs the same verification automatically to prevent publishing without a fresh passing build.
141
+ `prepublishOnly` runs the same verification automatically to prevent publishing without a fresh passing build.
142
+
143
+ ## Automated release (npm + GitHub Release)
144
+
145
+ This repo includes a tag-driven workflow at `.github/workflows/release.yml`.
146
+
147
+ 1. Bump the package version in `package.json`.
148
+ 2. Commit and push your changes.
149
+ 3. Create and push a matching tag (`v` + package version):
150
+
151
+ ```bash
152
+ git tag v1.0.2
153
+ git push origin v1.0.2
154
+ ```
155
+
156
+ On tag push, GitHub Actions will:
157
+
158
+ - validate tag version matches `package.json`
159
+ - run `yarn verify`
160
+ - publish to npm
161
+ - create a GitHub Release with generated notes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bs-widget",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "main": "dist/bundle.js",
6
6
  "type": "module",