@@ -268,34 +268,66 @@ bun run dev
268268
269269### Publishing a New Version
270270
271- 1 . ** Update package versions **
271+ We support two methods for publishing: ** GitHub Actions (Recommended) ** and ** Manual ** .
272272
273- ** Option A: Automatic (Recommended)**
273+ #### Method 1: GitHub Actions (Recommended)
274274
275- Use the version scripts to automatically bump versions in both packages :
275+ The easiest way to publish is using the automated GitHub Actions workflow :
276276
277- ``` bash
278- pnpm version:patch # 0.1.2 → 0.1.3 (bug fixes)
279- pnpm version:minor # 0.1.3 → 0.2.0 (new features)
280- pnpm version:major # 0.2.0 → 1.0.0 (breaking changes)
281- ```
277+ 1 . ** Go to GitHub Actions**
278+
279+ Navigate to: ` https://github.com/hyodotdev/kstyled/actions/workflows/publish.yml `
280+
281+ 2 . ** Run workflow**
282+
283+ - Click "Run workflow"
284+ - Select branch: ` main `
285+ - Choose version bump type:
286+ - ` patch ` - Bug fixes (0.3.0 → 0.3.1)
287+ - ` minor ` - New features (0.3.0 → 0.4.0)
288+ - ` major ` - Breaking changes (0.3.0 → 1.0.0)
289+ - Optional: Check "Dry run" to test without publishing
282290
283- This updates both ` kstyled ` and ` babel-plugin-kstyled ` at once.
291+ 3 . ** Wait for completion **
284292
285- ** Option B: Manual**
293+ The workflow will automatically:
294+ - ✅ Build all packages
295+ - ✅ Run type checking and tests
296+ - ✅ Bump versions in both packages
297+ - ✅ Commit and push changes
298+ - ✅ Publish to npm (with OIDC authentication)
299+ - ✅ Create git tag
300+ - ✅ Create GitHub Release with auto-generated notes
286301
287- Manually edit version in both packages:
288- - ` packages/kstyled/package.json `
289- - ` packages/babel-plugin-kstyled/package.json `
302+ 4 . ** Verify**
290303
291- Example: ` "version": "0.1.3" `
304+ Check that:
305+ - New version appears on npm
306+ - GitHub Release is created
307+ - Git tag is pushed
292308
293- > ** Note** : The root ` package.json ` version is for development only and doesn't affect npm publishing.
309+ ** Note** : The workflow uses OpenID Connect (OIDC) for npm authentication, so no NPM_TOKEN is needed.
310+
311+ #### Method 2: Manual Publishing
312+
313+ If you need to publish manually:
314+
315+ 1 . ** Update package versions**
316+
317+ Use the version scripts to automatically bump versions in both packages:
318+
319+ ``` bash
320+ pnpm version:patch # 0.3.0 → 0.3.1 (bug fixes)
321+ pnpm version:minor # 0.3.0 → 0.4.0 (new features)
322+ pnpm version:major # 0.3.0 → 1.0.0 (breaking changes)
323+ ```
324+
325+ This updates both ` kstyled ` and ` babel-plugin-kstyled ` at once using the custom ` scripts/bump-version.js ` script.
294326
2953272 . ** Build and test everything**
296328
297329 ``` bash
298- pnpm build && pnpm typecheck && pnpm lint
330+ pnpm build && pnpm typecheck && pnpm test
299331 ```
300332
301333 Make sure all checks pass with 0 errors.
@@ -304,7 +336,8 @@ bun run dev
304336
305337 ``` bash
306338 git add packages/* /package.json
307- git commit -m " chore: bump version to 0.1.3"
339+ git commit -m " chore: release v0.3.1"
340+ git tag v0.3.1
308341 ```
309342
3103434 . ** Verify npm login**
@@ -339,35 +372,40 @@ bun run dev
339372 pnpm publish:packages
340373 ```
341374
342- This publishes both ` kstyled ` and ` babel-plugin-kstyled ` to npm with public access as the ` latest ` version.
343-
344- ** Option B: Beta/Preview Release (next tag)**
375+ For provenance (recommended):
345376
346377 ``` bash
347- pnpm publish:packages --tag next
378+ pnpm publish:packages --provenance
348379 ```
349380
350- This publishes both packages with the ` next ` tag, allowing users to test pre-release versions without affecting the stable ` latest ` version:
381+ This publishes both ` kstyled ` and ` babel-plugin-kstyled ` to npm with public access as the ` latest ` version.
382+
383+ ** Option B: Beta/Preview Release (next tag)**
351384
352385 ``` bash
353- # Users can install the next version with:
354- npm install kstyled@next babel-plugin-kstyled@next
386+ pnpm publish:packages --tag next
355387 ```
356388
357389 Use this for:
358390 - Testing major changes before stable release
359391 - Preview releases for early adopters
360392 - Release candidates (e.g., ` 0.3.0-rc.1 ` )
361393
362- 7 . ** Create and push git tag **
394+ 7 . ** Push changes and tags **
363395
364396 ``` bash
365- git tag v0.1.3
366- git push
367- git push --tags
397+ git push origin main
398+ git push origin v0.3.1
368399 ```
369400
370- 8 . ** Verify publication**
401+ 8 . ** Create GitHub Release (optional)**
402+
403+ Go to: ` https://github.com/hyodotdev/kstyled/releases/new `
404+ - Select the tag you just pushed
405+ - Generate release notes automatically
406+ - Publish release
407+
408+ 9 . ** Verify publication**
371409
372410 ``` bash
373411 npm view kstyled version
0 commit comments