Skip to content

Commit 6a116f2

Browse files
committed
Update releasing instructions
1 parent dc1a2ef commit 6a116f2

File tree

1 file changed

+108
-17
lines changed

1 file changed

+108
-17
lines changed

RELEASING.md

Lines changed: 108 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,110 @@
11
# Releasing ShopifyAPI
22

3-
1. Before releasing, make sure `sorbet` and related gems are up to date:
4-
`bundle update sorbet sorbet-runtime sorbet-static tapioca --conservative`
5-
1. Check the Semantic Versioning page for info on how to version the new release: http://semver.org
6-
1. Update the version of ShopifyAPI in lib/shopify_api/version.rb
7-
1. Run `bundle`
8-
1. Add a CHANGELOG entry for the new release
9-
1. Commit the changes with a commit message like "Packaging for release X.Y.Z"
10-
1. Tag the release with the version (Leave REV blank for HEAD or provide a SHA)
11-
$ git tag vX.Y.Z REV
12-
1. Push out the changes
13-
$ git push
14-
1. Push out the tags
15-
$ git push --tags
16-
1. Publish the gem using Shipit
17-
1. Consider if the dependency in Shopify/shopify needs updated. It's used only by the tests so is a low risk change.
18-
Also consider Shopify/shopify_app whose gemspec depends on this.
19-
We don't need to do this for every release, but we should try to keep them relatively up to date.
3+
## Prerequisites
4+
5+
Before starting a release, ensure you have:
6+
7+
- Merged all code change PRs into main
8+
9+
## Release Process
10+
11+
### Step 1: Prepare the Release Branch
12+
13+
1. **Ensure all feature changes are merged**
14+
15+
```bash
16+
git checkout main
17+
git pull origin main
18+
```
19+
20+
Verify: Latest commits should match GitHub's main branch.
21+
22+
2. **Review changes to determine version bump**
23+
- Review merged PRs since last release: `git log v14.11.1..HEAD --oneline`
24+
- Apply [semantic versioning](https://semver.org/):
25+
- PATCH (X.Y.Z+1): Bug fixes only
26+
- MINOR (X.Y+1.0): New features, backward compatible
27+
- MAJOR (X+1.0.0): Breaking changes
28+
29+
### Step 2: Create Release Pull Request
30+
31+
1. **Create a new branch**
32+
33+
```bash
34+
git checkout -b vX.Y.Z
35+
```
36+
37+
2. **Update version number**
38+
Edit `lib/shopify_api/version.rb`:
39+
40+
```ruby
41+
module ShopifyAPI
42+
VERSION = "X.Y.Z" # Replace with your version
43+
end
44+
```
45+
46+
3. **Update dependencies**
47+
48+
```bash
49+
bundle update sorbet sorbet-runtime sorbet-static tapioca --conservative
50+
bundle install
51+
```
52+
53+
Expected: Gemfile.lock updates with new dependency versions.
54+
55+
4. **Update CHANGELOG**
56+
- Add entry under "## Unreleased" with format:
57+
58+
```markdown
59+
## X.Y.Z (YYYY-MM-DD)
60+
61+
- [#PR_NUMBER](https://github.com/Shopify/shopify-api-ruby/pull/PR_NUMBER) Description of change
62+
```
63+
64+
- Move all unreleased items under the new version
65+
66+
5. **Create and push PR**
67+
68+
```bash
69+
git add -A
70+
git commit -m "preparing for release v X.Y.Z"
71+
git push origin release-X.Y.Z
72+
```
73+
74+
- Title PR: "Release vX.Y.Z"
75+
- Add release notes to PR description
76+
77+
### Step 3: Tag and Publish
78+
79+
1. **After PR is merged, update local main**
80+
81+
```bash
82+
git checkout main
83+
git pull origin main
84+
```
85+
86+
Verify: `git log -1` shows your merge commit.
87+
88+
2. **Create and push tag**
89+
90+
```bash
91+
git tag -f vX.Y.Z && git push origin vX.Y.Z
92+
```
93+
94+
Verify: Tag appears at [https://github.com/Shopify/shopify-api-ruby/tags](https://github.com/Shopify/shopify-api-ruby/tags)
95+
96+
3. **Publish via Shipit**
97+
98+
4. **Verify gem publication**
99+
100+
List the gem on [https://rubygems.org/gems/shopify_api](https://rubygems.org/gems/shopify_api/versions/)
101+
102+
Expected: Shows your new version (may take 5-10 minutes).
103+
104+
### Step 4: Update Dependent Projects (Optional)
105+
106+
For major/minor releases, update these repositories:
107+
108+
- **Shopify/shopify_app**: Update gemspec
109+
- File: `shopify_app.gemspec`
110+
- Priority: High for breaking changes, medium otherwise

0 commit comments

Comments
 (0)