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
-`feature/<name>` for per-feature branches off `next`
8
-
-`release/<name>` for releases, or `patch/name` for direct updates to main
8
+
-`feature/<name>` for per-feature branches off `main`
9
9
10
10
## Contributing to packages
11
11
12
-
Each package change must be accompanied with an `Unreleased` changelog line.
12
+
This project uses [changesets](https://github.com/changesets/changesets) to document changes and manage releases to npm.
13
+
14
+
Each package change must be accompanied with a changeset entry.
15
+
16
+
To add a changeset to your PR:
17
+
18
+
```bash
19
+
nix develop
20
+
pnpm changeset
21
+
## Follow the interactive prompts to select packages and write a description.
22
+
## You can edit the generated markdown file in `.changeset/` later if needed.
23
+
## Commit the newly created file.
24
+
```
13
25
14
-
Types of changes
26
+
Please use this format for writing changesets:
15
27
16
28
-`Added` for new features.
17
29
-`Changed` for changes in existing functionality.
@@ -20,68 +32,16 @@ Types of changes
20
32
-`Fixed` for any bug fixes.
21
33
-`Security` in case of vulnerabilities.
22
34
23
-
## Releasing packages.
35
+
## Releasing packages
24
36
25
37
### Steps
26
38
27
-
_Note:_ if releasing more than 1 package, all can be in the same PR, but if a package depends on another, make sure to update the version of the dependant package before releasing it, and clean install and build again.
28
-
29
-
1. Open a PR to merge `next` into `main`. Can do regular merge, do not squash the commits. Review and merge.
30
-
31
-
2. Set up release environment
32
-
33
-
```bash
34
-
nix develop
35
-
git checkout main
36
-
git pull origin
37
-
git checkout -b release/<name>
38
-
rm -rf node_modules
39
-
pnpm install
40
-
turbo build
41
-
```
42
-
43
-
3.`cd` into package root
44
-
45
-
4. Generate new version
39
+
1. Run the github action `Version Packages`
46
40
47
-
```bash
48
-
# Patch release (0.0.1 → 0.0.2)
49
-
# backward-compatible bug fixes
50
-
npm version patch
51
-
52
-
# Minor release (0.0.1 → 0.1.0)
53
-
# backward-compatible new features
54
-
npm version minor
55
-
56
-
# Major release (0.1.0 → 1.0.0)
57
-
# backward-incompatible changes
58
-
npm version major
59
-
60
-
# Or set an exact version
61
-
npm version 0.2.0
62
-
```
63
-
64
-
5. Update `CHANGELOG.md` with new version.
41
+
- If there are changesets in the `.changesets` folder, the action will bump all versions and open a PR.
42
+
- Review the PR (carefully!) to make sure all versions are accurate. It is safe to pull the branch and make edits to version numbers
43
+
- Merge the PR
65
44
66
-
6. Publish to npm
45
+
2. Run the github action `Release Packages`
67
46
68
-
**Note:** You must have write access to the npm scope `@valence-protocol`. Run the publish command and follow the prompts to authenticate yourself via CLI.
69
-
70
-
```bash
71
-
cd<package root>
72
-
npm publish --access public
73
-
```
74
-
75
-
7. Open a PR from your `release/name` branch -> `main` with:
76
-
77
-
- migrated changelog
78
-
- package `version` updated in package.json
79
-
-`pnpm-lock.yaml` should change if packages depend on eachother
80
-
81
-
8. Reset `next` branch
82
-
83
-
```bash
84
-
git checkout next
85
-
git merge origin/main
86
-
git push origin next
87
-
```
47
+
- This will build all packages with their dependencies, and push the bundles to npm with the version specified in their `package.json`
0 commit comments