Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RELEASING.md to encourage release branches. #1180

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 23 additions & 14 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
## Production Releases

---
1. Make sure you're on the `main` branch (or fix branch, e.g. `v0.1-fixes`).
1. Pull a fresh copy of `origin/main` and tags.
```bash
git fetch --tags
```

1. Create a release branch off of `origin/main` (e.g. `release-v0.1`). (If this is a patch release, re-use the existing release branch if it still exists, or else check out a new one from the appropriate tag.)
```bash
git co -b release-v0.1 origin/main
```

1. Confirm that the kotlin build is green before committing any changes
(Note we exclude benchmarks, but you can check those too!)
Expand All @@ -16,11 +24,6 @@
developing - do not do this for actual releases) with the property `workflow.targets` which is
set to any of `kmp`, `jvm`, `ios`, or `js`.

1. Update your tags.
```bash
git fetch --tags
```

1. In `gradle.properties`, remove the `-SNAPSHOT` suffix from the `VERSION_NAME` property.
E.g. `VERSION_NAME=0.1.0`

Expand All @@ -30,12 +33,12 @@
git tag v0.1.0
```

1. Push those changes to the repository:
1. Push the release branch and tag to the repository:
```bash
git push
git push -u --tags
```

1. Run the `Publish Release` action in the [GitHub Actions](https://github.com/square/workflow-kotlin/actions/workflows/publish-release.yml) page by clicking "run workflow" on the right.
1. Run the `Publish Release` action in the [GitHub Actions](https://github.com/square/workflow-kotlin/actions/workflows/publish-release.yml) page by clicking "run workflow" on the right. Select the appropriate tag.

1. Wait for that publishing job to succeed.

Expand All @@ -44,15 +47,21 @@
snapshot version, e.g. `VERSION_NAME=0.2.0-SNAPSHOT`.

1. Commit the new snapshot version:
```
```bash
git commit -am "Finish releasing v0.1.0."
```

1. Push your commits and tags:
1. Push your release branch again:
```bash
git push origin release-v0.1
```
git push origin main && git push --tags
# or git push origin fix-branch
git push origin v0.1.0 && git push --tags

1. Merge the release branch into main and push again:
```bash
git co main
git reset --hard origin/main
git merge --no-ff release-v0.1
git push origin main
```

1. Create the release on GitHub:
Expand Down
Loading