@@ -10,80 +10,61 @@ This document describes how to release a new version of cypress-playwright-on-ra
10
10
4 . Development dependencies installed: ` bundle install `
11
11
- Includes ` gem-release ` for gem management (like react_on_rails)
12
12
13
- ## Release Tasks
13
+ ## Release Command
14
14
15
- The project uses rake tasks with ` gem-release ` to automate the release process (similar to react_on_rails and other ShakaCode gems):
16
-
17
- ### Quick Release
18
-
19
- ``` bash
20
- # Prepare and publish in one command
21
- rake release:prepare[1.19.0]
22
- # Review changes, commit
23
- rake release:publish
24
- ```
25
-
26
- ### Step-by-Step Release
27
-
28
- #### 1. Prepare the Release
15
+ The project uses a single rake task to automate the entire release process:
29
16
30
17
``` bash
31
- rake release:prepare[1.19.0 ]
18
+ rake release[VERSION,DRY_RUN ]
32
19
```
33
20
34
- This task will:
35
- - Validate the version format (X.Y.Z)
36
- - Use ` gem bump ` to update ` lib/cypress_on_rails/version.rb `
37
- - Update ` CHANGELOG.md ` with the new version and date
38
- - Provide next steps
21
+ ### Examples
39
22
40
- After running this:
41
23
``` bash
42
- # Review the changes
43
- git diff
24
+ # Release version 1.19.0
25
+ rake release[1.19.0]
44
26
45
- # Commit the version bump
46
- git add -A
47
- git commit -m " Bump version to 1.19.0"
27
+ # Automatic patch version bump (e.g., 1.18.0 -> 1.18.1)
28
+ rake release
48
29
49
- # Push to master
50
- git push origin master
30
+ # Dry run to preview what would happen
31
+ rake release[1.19.0,true]
51
32
```
52
33
53
- #### 2. Publish the Release
34
+ ### What the Release Task Does
54
35
55
- ``` bash
56
- rake release:publish
57
- ```
36
+ The ` rake release ` task will:
58
37
59
- This task will:
60
- - Verify you're on master branch
61
- - Verify working directory is clean
62
- - Run the test suite
63
- - Use ` gem release ` to:
64
- - Build the gem
65
- - Push the gem to RubyGems
66
- - Create a git tag (e.g., ` v1.19.0 ` )
67
- - Push the tag to GitHub
38
+ 1 . Pull latest changes from master
39
+ 2 . Bump the version in ` lib/cypress_on_rails/version.rb `
40
+ 3 . Update ` Gemfile.lock ` via ` bundle install `
41
+ 4 . Commit the version bump and Gemfile.lock changes
42
+ 5 . Create a git tag (e.g., ` v1.19.0 ` )
43
+ 6 . Push the commit and tag to GitHub
44
+ 7 . Build and publish the gem to RubyGems (will prompt for OTP)
68
45
69
- #### 3. Post-Release Steps
46
+ ### Post-Release Steps
70
47
71
48
After publishing, complete these manual steps:
72
49
73
- 1 . ** Create GitHub Release**
74
- - Go to https://github.com/shakacode/cypress-playwright-on-rails/releases/new?tag=v1.19.0
50
+ 1 . ** Update CHANGELOG.md**
51
+ ``` bash
52
+ bundle exec rake update_changelog
53
+ git commit -a -m ' Update CHANGELOG.md'
54
+ git push
55
+ ```
56
+
57
+ 2 . ** Create GitHub Release**
58
+ - Go to the releases page: https://github.com/shakacode/cypress-playwright-on-rails/releases
59
+ - Click on the newly created tag
75
60
- Copy release notes from CHANGELOG.md
76
61
- Publish the release
77
62
78
- 2 . ** Announce the Release**
63
+ 3 . ** Announce the Release** (optional)
79
64
- Post in Slack channel
80
65
- Tweet about the release
81
66
- Update forum posts if needed
82
67
83
- 3 . ** Close Related Issues**
84
- - Review issues addressed in this release
85
- - Close them with reference to the release
86
-
87
68
## Version Numbering
88
69
89
70
Follow [ Semantic Versioning] ( https://semver.org/ ) :
@@ -96,25 +77,27 @@ Follow [Semantic Versioning](https://semver.org/):
96
77
97
78
``` bash
98
79
# Patch release (bug fixes)
99
- rake release:prepare [1.18.1]
80
+ rake release[1.18.1]
100
81
101
82
# Minor release (new features)
102
- rake release:prepare [1.19.0]
83
+ rake release[1.19.0]
103
84
104
85
# Major release (breaking changes)
105
- rake release:prepare[2.0.0]
86
+ rake release[2.0.0]
87
+
88
+ # Automatic patch bump
89
+ rake release
106
90
```
107
91
108
92
## Pre-Release Checklist
109
93
110
- Before running ` rake release:prepare ` :
94
+ Before running ` rake release ` :
111
95
112
96
- [ ] All PRs for the release are merged
113
97
- [ ] CI is passing on master
114
98
- [ ] CHANGELOG.md has [ Unreleased] section with all changes
115
99
- [ ] Major changes have been tested manually
116
100
- [ ] Documentation is up to date
117
- - [ ] Issue #183 discussion is resolved (if applicable)
118
101
119
102
## Troubleshooting
120
103
@@ -135,14 +118,6 @@ git add -A && git commit -m "Your message"
135
118
git stash
136
119
```
137
120
138
- ### "Tests failed" error
139
-
140
- ``` bash
141
- # Fix the failing tests before releasing
142
- bundle exec rake spec
143
-
144
- # If tests are truly failing, don't release
145
- ```
146
121
147
122
### "Failed to push gem to RubyGems" error
148
123
@@ -154,16 +129,19 @@ gem signin
154
129
155
130
### Tag already exists
156
131
157
- If you need to re-release:
132
+ If you need to re-release the same version :
158
133
``` bash
159
134
# Delete local tag
160
135
git tag -d v1.19.0
161
136
162
137
# Delete remote tag
163
138
git push origin :v1.19.0
164
139
165
- # Try again
166
- rake release:publish
140
+ # Reset to before the release commit
141
+ git reset --hard HEAD~1
142
+
143
+ # Try the release again
144
+ rake release[1.19.0]
167
145
```
168
146
169
147
## Rollback
@@ -194,34 +172,29 @@ git push origin master
194
172
git checkout master
195
173
git pull --rebase
196
174
197
- # 2. Prepare the release
198
- rake release:prepare[1.19.0]
199
- # Review output, confirm with 'y'
200
-
201
- # 3. Review and commit changes
202
- git diff
203
- git add -A
204
- git commit -m " Bump version to 1.19.0"
175
+ # 2. Check CI is passing
176
+ # Visit: https://github.com/shakacode/cypress-playwright-on-rails/actions
205
177
206
- # 4. Run tests (optional, publish will run them too)
207
- bundle exec rake spec
208
-
209
- # 5. Push to master
210
- git push origin master
178
+ # 3. Release (will handle everything automatically)
179
+ rake release[1.19.0]
180
+ # Enter your RubyGems OTP when prompted
211
181
212
- # 6. Publish the release
213
- rake release:publish
182
+ # 4. Update the changelog
183
+ bundle exec rake update_changelog
184
+ git commit -a -m ' Update CHANGELOG.md'
185
+ git push
214
186
215
- # 7. Create GitHub release
216
- open " https://github.com/shakacode/cypress-playwright-on-rails/releases/new?tag=v1.19.0"
187
+ # 5. Create GitHub release
188
+ open " https://github.com/shakacode/cypress-playwright-on-rails/releases"
189
+ # Click on the new tag, add release notes from CHANGELOG.md
217
190
218
- # 8 . Celebrate! 🎉
191
+ # 6 . Celebrate! 🎉
219
192
```
220
193
221
194
## Notes
222
195
223
- - The release tasks will ** not ** push commits to master for you
224
- - Always review changes before committing
225
- - The ` publish ` task will run tests before releasing
226
- - Tags are created locally first, then pushed
227
- - Failed releases can be retried after fixing issues
196
+ - The release task handles all git operations (commit, tag, push) automatically
197
+ - Always ensure CI is green before releasing
198
+ - The task will fail fast if working directory is not clean
199
+ - Failed releases can be retried after fixing issues
200
+ - Use dry run mode ( ` rake release[VERSION,true] ` ) to preview changes
0 commit comments