You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Publishing runs automatically when a **GitHub Release** is published (see [npm-publish.yml](./workflows/npm-publish.yml)).
4
+
5
+
## Prerelease (e.g. `0.2.0-beta.0`)
6
+
7
+
1. Merge the version bump on `master` (or your release branch). `package.json` must use a **semver prerelease** (a hyphen in the version, e.g. `0.2.0-beta.0`, `0.2.0-rc.1`).
8
+
2. Create and push an annotated tag matching the version:
9
+
10
+
```bash
11
+
git checkout master && git pull
12
+
git tag -a v0.2.0-beta.0 -m "v0.2.0-beta.0"
13
+
git push origin v0.2.0-beta.0
14
+
```
15
+
16
+
3. On GitHub: **Releases → Draft a new release → Choose tag `v0.2.0-beta.0` →** describe changes → check **Set as a pre-release** (optional but recommended) → **Publish release**.
17
+
18
+
4. The workflow publishes to npm with the **`beta`** dist-tag so `latest` stays on the last stable version. Install with:
19
+
20
+
```bash
21
+
npm install -g @bitrefill/cli@beta
22
+
```
23
+
24
+
## Stable release (e.g. `0.2.0`)
25
+
26
+
1. Merge `package.json` version **`0.2.0`** (no prerelease suffix) and sync CLI/MCP version strings in `src/` if you still duplicate them.
27
+
2. Tag and push:
28
+
29
+
```bash
30
+
git tag -a v0.2.0 -m "v0.2.0"
31
+
git push origin v0.2.0
32
+
```
33
+
34
+
3.**Publish release** on GitHub (not marked as pre-release). The workflow publishes as **latest**.
35
+
36
+
## Requirements
37
+
38
+
-**npm:**[Trusted publishing](https://docs.npmjs.com/trusted-publishers) (OIDC) for this repo, or a valid `NPM_TOKEN` if your org uses classic tokens instead.
39
+
-**Version:** The tag should match the commit that contains the same `version` in `package.json` as what you intend to ship.
@@ -359,7 +368,7 @@ async function main(): Promise<void> {
359
368
.description(
360
369
'Bitrefill CLI - browse, buy, and manage gift cards, mobile top-ups, and eSIMs.\n\nTerms: https://www.bitrefill.com/terms\nPrivacy: https://www.bitrefill.com/privacy'
361
370
)
362
-
.version('0.1.1')
371
+
.version('0.2.0-beta.0')
363
372
.option(
364
373
'--api-key <key>',
365
374
'Bitrefill API key (overrides BITREFILL_API_KEY env var)'
0 commit comments