@ahhaohho/event-publisher 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -159,4 +159,22 @@ npm run typecheck
|
|
|
159
159
|
npm run build # dist/
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
### CI/CD
|
|
163
|
+
|
|
164
|
+
- **CI** (`.github/workflows/ci.yml`): 모든 PR과 main push에서 Node 20·22로 typecheck → test → build → 패키지 파일 구성 검사.
|
|
165
|
+
- **배포** (`.github/workflows/publish.yml`): **`package.json` version을 올린 PR을 main에 머지하면 배포된다.**
|
|
166
|
+
1. main push 때 그 version이 npm에 없으면 publish한다. 이미 있으면 아무 것도 하지 않는다(일반 머지는 no-op).
|
|
167
|
+
2. 익명으로 레지스트리를 조회해 200인지 확인한다. 전파 지연을 고려해 15초 간격으로 최대 5분 재시도하고, 그래도 아니면 실패 처리(private으로 나간 경우).
|
|
168
|
+
3. `v{version}` 태그가 없으면 만든다. publish 여부와 무관하게 매번 확인하므로, 태그 push만 실패했거나 로컬에서 수동 publish한 버전도 다음 main push에서 태그가 생긴다.
|
|
169
|
+
|
|
170
|
+
> 루트 CLAUDE.md의 "SDK 배포 워크플로우"(머지 후 `npm version` → 수동 `npm publish`)는 이 레포에 적용하지 않는다. main 직접 커밋·수동 publish 대신 버전 범프 PR을 머지한다. 수동 publish를 했더라도 워크플로는 skip + 태그만 만들므로 충돌은 없다.
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
git checkout -b chore/t-{shortLink}-release-x.y.z
|
|
174
|
+
npm version minor --no-git-tag-version # patch | minor | major
|
|
175
|
+
git commit -am "chore: release x.y.z" && gh pr create --base main
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
인증은 npm Trusted Publishing(OIDC)이 먼저, 실패하면 `NPM_TOKEN` 시크릿(granular, bypass 2FA)으로 폴백한다. 둘 다 없으면 로컬 `npm login` → `npm publish` → `npm logout`.
|
|
179
|
+
|
|
180
|
+
**패키지는 public이어야 한다** — 서버 CI·박스는 npm 토큰 없이 익명으로 설치한다.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ahhaohho/event-publisher",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "AhhaOhho 도메인 이벤트 발행 SDK — EventBridge envelope + Zod 이벤트 카탈로그",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"license": "ISC",
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
|
23
|
-
"url": "https://github.com/Future-Lab-META/event-publisher"
|
|
23
|
+
"url": "git+https://github.com/Future-Lab-META/event-publisher.git"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=20"
|