Skip to content

Commit 85b9256

Browse files
Merge pull request #268 from dvonthenen/example-tag-release
Example Tagging Release
2 parents dc0be84 + 56d8aa0 commit 85b9256

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/BRANCH_AND_RELEASE_PROCESS.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,55 @@ In the event of a breaking interface change, a `release-v[0-9]+` branch is creat
8686
In scenarios where urgent issues arise, the `hotfix` branch comes into play. A hotfix branch is created off main or the relevant release branch to address critical issues that need immediate attention. After the hotfix is implemented and thoroughly tested, it is merged back into both the `main` and the `release-v[0-9]+` branches to ensure the fix is included in the current and future versions of the project.
8787

8888
This dual approach of leveraging both **GitHub Flow** and **Git Flow** ensures that the project can iterate quickly while maintaining high standards of code stability and release management.
89+
### Creating a Release
90+
91+
Since the latest stable code is contained on `main` in a typical **GitHub Flow**, to create a release someone with write access to the repository needs to simply just `git tag` the release and then create a (draft) release using that tag in the [repository's release page](https://github.com/deepgram/deepgram-go-sdk/releases).
92+
93+
If you haven't done this before, these are the typicial commands to execute at the root of the repository assuming you are on your fork:
94+
95+
```bash
96+
# get the latest everything and update your fork
97+
git checkout main
98+
git pull --rebase upstream main
99+
git push
100+
git fetch upstream --tags
101+
git push origin --tags
102+
103+
# create a new tag following semver
104+
git tag -m <version> <version>
105+
git push upstream <version>
106+
```
107+
108+
If the release you want to create is `v3.9.0`, then this would look like:
109+
110+
```bash
111+
# get the latest everything and update your fork
112+
git checkout main
113+
git pull --rebase upstream main
114+
git push
115+
git fetch upstream --tags
116+
git push origin --tags
117+
118+
# create a new tag following semver
119+
git tag -m v3.9.0 v3.9.0
120+
git push upstream v3.9.0
121+
```
122+
123+
#### Creating a Release from a Release Branch
124+
125+
While we don't have a formal requirement for supporting past releases (ie currently on `v3` but need a patch on `v2`), there are times when you need to provide a patch release for things like security fixes. To create that patch releases, you do something similar as you would have done on main, but on the `release-v[0-9]+/*` branch.
126+
127+
If this were the `release-v2` branch for version `v2.5.1` (note the `v2` matches the `release-v2`), this would look like (again, assuming you are on your fork):
128+
129+
```bash
130+
# get the latest everything and update your fork
131+
git checkout release-v2
132+
git pull --rebase upstream release-v2
133+
git push origin release-v2
134+
git fetch upstream --tags
135+
git push origin --tags
136+
137+
# create a new tag following semver
138+
git tag -m v2.5.1 v2.5.1
139+
git push upstream v2.5.1
140+
```

0 commit comments

Comments
 (0)