Skip to content

Commit fd04ef9

Browse files
committed
build: add publish make targets
Release steps lived in the README as raw npm commands. Move them into the repo's make workflow: per-package publish targets plus a root target that runs the suite first, matching the existing test-load delegation. Publishing is a maintainer step, so the README keeps only a one-line pointer.
1 parent f2659f6 commit fd04ef9

4 files changed

Lines changed: 21 additions & 22 deletions

File tree

‎Makefile‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BUN ?= bun
22

3-
.PHONY: install test test-load
3+
.PHONY: install test test-load publish
44

55
install:
66
$(BUN) install
@@ -11,3 +11,9 @@ test:
1111
test-load:
1212
$(MAKE) -C packages/reviewer test-load
1313
$(MAKE) -C packages/subagent-model test-load
14+
15+
# Publishes both packages after the suite passes, prompting for an npm one-time
16+
# password per package. A version already on the registry fails the publish.
17+
publish: test
18+
$(MAKE) -C packages/reviewer publish
19+
$(MAKE) -C packages/subagent-model publish

‎README.md‎

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,5 @@ make test-load
4646

4747
`make test-load` requires an installed `opencode2` executable. It uses disposable configuration and data directories.
4848

49-
## Release
50-
51-
Publishing is manual and per package, from a clean checkout of `main`:
52-
53-
```sh
54-
(cd packages/reviewer && npm publish --access public)
55-
(cd packages/subagent-model && npm publish --access public)
56-
```
57-
58-
Both packages ship TypeScript sources; there is no build step. Bump the package `version` and tag the commit before
59-
publishing, using one tag per released package:
60-
61-
```sh
62-
git tag reviewer-v0.1.0
63-
git tag subagent-model-v0.1.0
64-
```
65-
66-
Packages are published under the `@joonix` scope. `publishConfig.access` is already `public`, so a first scoped
67-
publish does not default to restricted.
49+
Maintainers release both packages with `make publish`, which runs the suite first. Bump each package `version`
50+
beforehand; a version already on the registry fails the publish.

‎packages/reviewer/Makefile‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
BUN ?= bun
2+
NPM ?= npm
23

3-
.PHONY: install test test-load test-security
4+
.PHONY: install test test-load test-security publish
45

56
install:
67
$(BUN) install
@@ -14,3 +15,7 @@ test-load:
1415

1516
test-security:
1617
REVIEWER_LIVE=1 $(BUN) test test/reviewer.test.ts --test-name-pattern 'live classifier'
18+
19+
# Prompts for an npm one-time password unless a bypass-2FA token is configured.
20+
publish:
21+
$(NPM) publish --access public

‎packages/subagent-model/Makefile‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
BUN ?= bun
2+
NPM ?= npm
23

3-
.PHONY: test test-load
4+
.PHONY: test test-load publish
45

56
test:
67
$(BUN) run test
78

89
test-load:
910
./scripts/load-check.sh
11+
12+
# Prompts for an npm one-time password unless a bypass-2FA token is configured.
13+
publish:
14+
$(NPM) publish --access public

0 commit comments

Comments
 (0)