Skip to content

Commit 0800b59

Browse files
authored
1.1.0 (#9)
* 1.1.0 * Add publish instructions
1 parent 7d8ddb2 commit 0800b59

File tree

3 files changed

+67
-59
lines changed

3 files changed

+67
-59
lines changed

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,22 @@ Our GitHub Action prebuilds a binary for each supported platform. We release dif
3232

3333
### Release package
3434

35-
When you want to release the package:
35+
The process isn't ideal for our workflow, we inherited it from the `napi-rs` template. The release action looks for a new commit on main that starts with a valid semver number (such as `4.12.3`). Since we only allow merge commits, this means we need to merge a PR with the semver as a title. We also need to update the `package.json` in the same PR.
3636

37-
```bash
38-
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
37+
Follow these steps for a foolproof way to make a new release:
3938

40-
git push
41-
```
39+
1. Make a new branch from up-to-date `main`.
40+
```sh
41+
git switch -c release && git reset --hard origin/main && git pull origin main
42+
```
43+
2. Run the following command to update `package.json` and make a commit:
44+
45+
```bash
46+
npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
47+
```
48+
49+
3. Run `gh pr create` and accept the defaults. This will create a PR with the correct title. Submit the PR.
50+
4. Once CI has passed and been approved, merge the PR. This will trigger a release.
4251

43-
GitHub actions will do the rest job for you.
4452

4553
> WARN: Don't run `npm publish` manually.

0 commit comments

Comments
 (0)