11# Publishing Scripts
22
3- Helper scripts for managing package releases.
3+ Helper scripts for managing package releases following semantic versioning.
4+
5+ ## Overview
6+
7+ Three scripts automate version bumping and publishing:
8+ - ** publish-patch.sh** - Bug fixes (1.0.0 → 1.0.1)
9+ - ** publish-minor.sh** - New features (1.0.5 → 1.1.0)
10+ - ** publish-major.sh** - Breaking changes (1.5.3 → 2.0.0)
11+
12+ All scripts:
13+ - Automatically calculate the new version
14+ - Commit the version bump
15+ - Clean up any existing tags (from previous failed attempts)
16+ - Create and push new version tag
17+ - Trigger GitHub Actions publish workflow
18+
19+ ** Making scripts executable:**
20+ ``` bash
21+ chmod +x scripts/publish-patch.sh scripts/publish-minor.sh scripts/publish-major.sh
22+ ```
423
524## publish-patch.sh
625
7- Automates the complete patch version release workflow .
26+ Automates patch version releases for bug fixes and minor improvements .
827
928** What it does:**
10291 . Bumps patch version in package.json (e.g., 1.0.0 → 1.0.1)
11302 . Commits the version bump
12- 3 . Deletes old tag if it exists (both local and remote )
31+ 3 . Deletes NEW version tag if it exists (from previous failed attempt )
13324 . Creates new version tag
14335 . Pushes everything to trigger GitHub Actions publish workflow
1534
@@ -21,8 +40,8 @@ Automates the complete patch version release workflow.
2140** When to use:**
2241- Publishing bug fixes
2342- After making workflow/configuration changes
24- - When you need to republish after fixing issues
25- - Moving a tag to a newer commit
43+ - Documentation updates
44+ - Performance improvements without API changes
2645
2746** Prerequisites:**
2847- All changes committed
@@ -45,14 +64,92 @@ Continue? (y/n) y
4564
4665Step 1: Updating version to 1.0.1...
4766Step 2: Committing version bump...
48- Step 3: Deleting old v1.0.0 tag if it exists...
67+ Step 3: Deleting v1.0.1 tag if it exists (from previous failed attempt) ...
4968Step 4: Creating v1.0.1 tag...
5069Step 5: Getting current branch...
5170Step 6: Pushing to remote...
5271
5372✅ Done!
5473```
5574
75+ ## publish-minor.sh
76+
77+ Automates minor version releases for new features.
78+
79+ ** What it does:**
80+ 1 . Bumps minor version in package.json (e.g., 1.0.5 → 1.1.0)
81+ 2 . Commits the version bump
82+ 3 . Deletes NEW version tag if it exists (from previous failed attempt)
83+ 4 . Creates new version tag
84+ 5 . Pushes everything to trigger GitHub Actions publish workflow
85+
86+ ** Usage:**
87+ ``` bash
88+ ./scripts/publish-minor.sh
89+ ```
90+
91+ ** When to use:**
92+ - Adding new features
93+ - New framework adapters
94+ - New configuration options
95+ - Backwards-compatible API additions
96+
97+ ** Prerequisites:**
98+ - All changes committed
99+ - Clean working directory
100+ - On the correct branch
101+ - New features tested and documented
102+
103+ ** Example:**
104+ ```
105+ Current: 1.2.5
106+ New: 1.3.0
107+ ```
108+
109+ ## publish-major.sh
110+
111+ Automates major version releases for breaking changes.
112+
113+ ** What it does:**
114+ 1 . Bumps major version in package.json (e.g., 1.5.3 → 2.0.0)
115+ 2 . Commits the version bump with BREAKING CHANGE notice
116+ 3 . Deletes NEW version tag if it exists (from previous failed attempt)
117+ 4 . Creates new version tag
118+ 5 . Pushes everything to trigger GitHub Actions publish workflow
119+
120+ ** Usage:**
121+ ``` bash
122+ ./scripts/publish-major.sh
123+ ```
124+
125+ ** When to use:**
126+ - Breaking API changes
127+ - Removing deprecated features
128+ - Major refactoring that affects public API
129+ - Incompatible updates to dependencies
130+
131+ ** Prerequisites:**
132+ - All changes committed
133+ - Clean working directory
134+ - ** CHANGELOG.md updated with breaking changes**
135+ - ** Migration guide prepared**
136+ - Breaking changes reviewed and documented
137+
138+ ** Example:**
139+ ```
140+ ⚠️ WARNING: This is a MAJOR version bump!
141+
142+ Current version: 1.5.3
143+ New version will be: 2.0.0
144+
145+ ⚠️ This is a breaking change! Make sure you've:
146+ - Updated CHANGELOG.md with breaking changes
147+ - Updated migration guide
148+ - Reviewed all breaking API changes
149+
150+ Are you sure you want to continue? (y/n)
151+ ```
152+
56153## verify-package.cjs
57154
58155Verifies package structure before publishing.
0 commit comments