Skip to content

Commit 93b0101

Browse files
committed
Create RELEASING.md
1 parent 0b56a7c commit 93b0101

File tree

1 file changed

+95
-0
lines changed

1 file changed

+95
-0
lines changed

RELEASING.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Releasing
2+
3+
This document describes the steps to release a new version of PublicSuffix.
4+
5+
## Prerequisites
6+
7+
- You have commit access to the repository
8+
- You have push access to the repository
9+
- You have a GPG key configured for signing tags
10+
- You have permission to publish to RubyGems
11+
12+
## Release process
13+
14+
1. **Determine the new version** using [Semantic Versioning](https://semver.org/)
15+
16+
```shell
17+
VERSION=X.Y.Z
18+
```
19+
20+
- **MAJOR** version for incompatible API changes
21+
- **MINOR** version for backwards-compatible functionality additions
22+
- **PATCH** version for backwards-compatible bug fixes
23+
24+
2. **Update the version file** with the new version
25+
26+
Edit `lib/public_suffix/version.rb` and update the `VERSION` constant:
27+
28+
```ruby
29+
VERSION = "X.Y.Z"
30+
```
31+
32+
3. **Update the changelog** with the new version
33+
34+
Edit `CHANGELOG.md` and add a new section for the release:
35+
36+
```markdown
37+
## vX.Y.Z
38+
39+
- Description of changes
40+
```
41+
42+
4. **Install dependencies**
43+
44+
```shell
45+
bundle install
46+
```
47+
48+
or simply:
49+
50+
```shell
51+
bundle
52+
```
53+
54+
5. **Run tests** and confirm they pass
55+
56+
```shell
57+
bundle exec rake test
58+
```
59+
60+
6. **Commit the new version**
61+
62+
```shell
63+
git add lib/public_suffix/version.rb CHANGELOG.md Gemfile.lock
64+
git commit -m "Release $VERSION"
65+
```
66+
67+
7. **Create a signed tag**
68+
69+
```shell
70+
git tag -a v$VERSION -s -m "Release $VERSION"
71+
```
72+
73+
8. **Push the changes and tag**
74+
75+
```shell
76+
git push origin main
77+
git push origin v$VERSION
78+
```
79+
80+
9. **Build and publish the gem**
81+
82+
```shell
83+
bundle exec rake release
84+
```
85+
86+
This will:
87+
- Build the gem
88+
- Push it to RubyGems
89+
- Create a GitHub release
90+
91+
## Post-release
92+
93+
- Verify the new version appears on [RubyGems](https://rubygems.org/gems/public_suffix)
94+
- Verify the GitHub release was created
95+
- Announce the release if necessary

0 commit comments

Comments
 (0)