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
This project uses [Changesets](https://github.com/changesets/changesets) to manage versioning and publishing to npm. The process is automated using GitHub Actions.
4
+
5
+
## Steps to Release
6
+
7
+
1.**Make your code changes**: Implement your features, bug fixes, etc., on a feature branch (e.g., `issue/your-issue-number` or `feat/short-description`).
8
+
9
+
2.**Create a Changeset**:
10
+
Before committing your changes, or after your main changes are staged, run the following command:
11
+
```bash
12
+
npx changeset
13
+
```
14
+
* You will be prompted to selectthe package(s) to version (select `fcm-cloudflare-workers`).
15
+
* Choose the type of change according to [SemVer](https://semver.org/) (patch, minor, or major).
16
+
*`patch`: For bug fixes or very small changes (e.g., 2.0.0 -> 2.0.1)
17
+
*`minor`: For new features that are backward-compatible (e.g., 2.0.0 -> 2.1.0)
18
+
*`major`: For breaking changes (e.g., 2.0.0 -> 3.0.0)
19
+
* Enter a clear and concise summary of the changes. This summary will be used in the `CHANGELOG.md`.
20
+
21
+
3. **Commit the Changeset and Your Code**:
22
+
Add the generated changeset file (located in the `.changeset/` directory) and your code changes to git and commit them:
23
+
```bash
24
+
git add .
25
+
git commit -m "feat: your descriptive commit message (includes changeset)"
26
+
```
27
+
Or, if you prefer separate commits:
28
+
```bash
29
+
git add .changeset/your-changeset-name.md
30
+
git commit -m "chore: add changeset for upcoming release"
31
+
# then commit your code changes
32
+
git add src/ # or other changed files
33
+
git commit -m "feat: implemented new feature X"
34
+
```
35
+
36
+
4. **Push Your Branch**:
37
+
Push your feature branch to GitHub:
38
+
```bash
39
+
git push origin your-branch-name
40
+
```
41
+
42
+
5. **Create a Pull Request**:
43
+
Go to the GitHub repository and create a Pull Request (PR) from your feature branch to the `main` branch.
44
+
45
+
6. **Merge the Pull Request**:
46
+
Once the PR is reviewed and approved, merge it into the `main` branch.
47
+
48
+
7. **Automatic Versioning and Publishing**:
49
+
* Upon merging to `main`, the `Publish to npm` GitHub Action (defined in`.github/workflows/npm-publish.yml`) will trigger.
50
+
* This action uses the changeset to:
51
+
* Bump the version in`package.json`.
52
+
* Update `CHANGELOG.md`.
53
+
* Publish the new version to npm.
54
+
* Create a new PR titled "chore: version packages" (or similar) which contains the version bump and changelog updates.
55
+
56
+
8. **Merge the Versioning Pull Request**:
57
+
Review and merge the "chore: version packages" PR created by the Changesets action. This finalizes the release process by updating the `package.json` and `CHANGELOG.md` on the `main` branch.
58
+
59
+
Your package is now published with the new version!
0 commit comments