Skip to content

Commit 51c1995

Browse files
committed
docs: contributing
1 parent a2fac6d commit 51c1995

1 file changed

Lines changed: 91 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Contributing to Berth
2+
3+
Welcome, and thanks for your interest in contributing to **Berth**! 🎉
4+
We appreciate contributions of all kinds — code, documentation, bug reports, and ideas.
5+
6+
## 🛠 Project Setup
7+
8+
### Requirements
9+
10+
- Go `1.24+` installed and in your `PATH`
11+
- [`make`](https://www.gnu.org/software/make/) installed
12+
- [`golangci-lint`](https://golangci-lint.run/) installed (optional for local linting)
13+
14+
### Setup
15+
16+
```bash
17+
git clone https://github.com/rluders/berth.git
18+
cd berth
19+
go mod tidy
20+
````
21+
22+
## 🧪 Running Tests
23+
24+
```bash
25+
make test
26+
```
27+
28+
Runs all unit tests in the project using `go test ./...`.
29+
30+
## ⚙️ Building
31+
32+
```bash
33+
make build
34+
```
35+
36+
Compiles the binary into the `bin/` directory.
37+
38+
## 🧼 Linting
39+
40+
Berth uses [golangci-lint](https://golangci-lint.run/) in CI. You can run it locally with:
41+
42+
```bash
43+
golangci-lint run
44+
```
45+
46+
To install:
47+
48+
```bash
49+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
50+
```
51+
52+
## 🔄 Making a Pull Request
53+
54+
1. Fork the repository and create a branch from `main`
55+
2. Make your changes
56+
3. Run tests and linters locally
57+
4. Push your branch and open a pull request
58+
59+
Please ensure that:
60+
61+
* Code is well-commented
62+
* You’ve run `go mod tidy` to keep dependencies clean
63+
* Lint passes: `golangci-lint run`
64+
* Tests pass: `make test`
65+
66+
## 🚀 Releasing a New Version
67+
68+
Releases are automated using [GoReleaser](https://goreleaser.com) and GitHub Actions.
69+
70+
### Steps:
71+
72+
1. Make sure all changes are merged into `main`
73+
2. Bump the version using [semantic versioning](https://semver.org/), e.g.:
74+
75+
```bash
76+
git tag v1.0.0
77+
git push origin v1.0.0
78+
```
79+
80+
3. GitHub Actions will:
81+
82+
* Build the binaries for multiple platforms
83+
* Generate checksums
84+
* Create a GitHub Release with attached binaries
85+
86+
You can view release results in the **Actions** tab and under **Releases** in GitHub.
87+
88+
## 💬 Need Help?
89+
90+
Open an issue or start a discussion. We’re happy to help!
91+

0 commit comments

Comments
 (0)