Contributing
How To Contribute
Creating an Issue
Bug Reports
Before submitting, please review our Reporting Bugs guide for tips on how to identify and report issues effectively.
Feature Requests
Make sure there isn't already an open issue or PR about the feature you're proposing. Check:
Creating a Pull Request
Development Setup
Before making your first contribution, run the setup command to install development dependencies:
make setupThis installs:
- commitlint - Validates commit message format
- git hooks - Automatically validates commits before push
Development Workflow
We use GitHub Flow with automated CI/CD:
Quick workflow:
Setup (first time only)
bashmake setupCreate feature branch from master
bashgit checkout master && git pull git checkout -b feat/my-featureMake changes and commit
bash# Make your changes git add . git commit -m "feat: add cabin management system"Push and open PR
bashgit push -u origin feat/my-feature # Then create a PR on GitHub targeting 'master'After merge - Preview builds publish automatically to DockerHub
Commit Conventions
We use Conventional Commits for semantic versioning and automated changelog generation.
Format:
<type>: <description>
[optional body]Types:
feat:- New feature (bumps minor version: 1.0.0 → 1.1.0)fix:- Bug fix (bumps patch version: 1.0.0 → 1.0.1)docs:- Documentation only (no version bump)chore:- Maintenance tasks (no version bump)refactor:- Code refactoring (no version bump)test:- Adding tests (no version bump)
Breaking changes:
feat!:orBREAKING CHANGE:in body (bumps major version: 1.0.0 → 2.0.0)
Examples:
git commit -m "feat: add cabin management system"
git commit -m "fix: resolve memory leak in server loop"
git commit -m "docs: update installation guide"
git commit -m "feat!: redesign configuration format"Commit validation:
After running make setup, git hooks will automatically validate your commits:
- ❌ Invalid:
"update readme"→ Error: type missing - ✅ Valid:
"docs: update readme"→ Accepted
Making the Pull Request
- PR title should follow commit conventions
- Link related issues in the description (e.g., "Fixes #123")
- Keep changes focused - one feature/fix per PR
- Avoid unrelated changes - no formatting or whitespace changes unrelated to your PR
- Write clear descriptions - explain what you changed and why
We use "Squash and Merge" to combine all commits when merging.
For Maintainers
Repository Setup
1. Configure GitHub Secrets
Go to Settings → Secrets → Actions and add:
| Secret | Description |
|---|---|
DOCKERHUB_USERNAME | DockerHub username |
DOCKERHUB_TOKEN | Create token |
STEAM_USERNAME | Steam username (for game download during build) |
STEAM_PASSWORD | Steam password |
STEAM_REFRESH_TOKEN | Steam OAuth refresh token (optional, preferred over password) |
2. Configure Branch Protection
Protect master:
- Settings → Branches → Add rule
- Pattern:
master - Enable:
- ✅ Require pull request before merging
- ✅ Require status checks:
Validate Build - ✅ Require approvals: 1
3. Configure Fork PR Protection
Settings → Actions → General → Fork pull request workflows:
- Select "Require approval for all outside collaborators"
Troubleshooting
Build Issues
Build fails with Steam auth error:
- Verify
STEAM_USERNAMEandSTEAM_PASSWORD(orSTEAM_REFRESH_TOKEN) secrets are set - Ensure Steam account owns Stardew Valley
Docker push fails:
- Verify
DOCKERHUB_TOKENhas read/write permissions - Check repository
sdvd/serverexists on DockerHub
Version Issues
Version doesn't bump correctly:
- Check commit messages follow conventional format
- Use
git log <last-tag>..HEADto verify commits - Commits without
feat:orfix:don't bump version
Release PR not created:
- Ensure commits since last tag include version-bumping types (
feat:,fix:) - Check GitHub Actions logs for errors
Resources
Getting Help
- Ask in Discord
- Comment on the relevant issue or PR
- Check existing PRs for examples