Thank you for your interest in contributing to our [Your CLI Name]! Your contributions play a vital role in enhancing the quality and performance of our tool.
- Minimal Golang version
1.20or later - Docker or any compatible container engine for building container images
- Installed
pre-commithooks by runningpre-commit install. This will install the pre-commit hooks in your local repository. - Taskfile optionally, for running the tasks defined in
Taskfile.yml. All tasks fromTaskfile.ymlare also available as Makefile targets.
- Have a peek at the open issues.
- Suggest a new feature or report a bug by creating a new issue.
- For beginners, look for issues labeled as good first issue.
Your assistance and contributions are always welcome, whether it's bug fixing, new feature suggestions, or documentation improvements.
- [Your preferred communication channel]
- Feel free to get in touch and discuss any issue or feature proposal.
- Fork the repo and create a new branch from
main. - Make sure your commit messages adhere to conventional commits standards for clarity.
- If you're working on an issue, please assign it to yourself.
- Your Pull Request should be updated with the
mainbranch, and must pass all checks. - Ensure that the PR template is completed, and the issue it addresses is linked.
- Mark your PR as draft until work completion, thereafter, request a review.
We use Semantic Commits to make it easier to understand what a commit does and to build pretty changelogs. Please use the following prefixes for your commits:
feat: A new featurefix: A bug fixdocs: Documentation changeschores: Changes to the build process or auxiliary tools and libraries such as documentation generationrefactor: A code change that neither fixes a bug nor adds a featuretest: Adding missing tests or correcting existing testsci: Changes to our CI configuration files and scripts
An example for this could be:
git commit -m "docs: add a new section to the README"
Releases are done using Release Please and GoReleaser. The workflow looks like this:
-
A PR is merged to the
mainbranch:- Release please is triggered, creates or updates a new release PR
- This is done with every merge to main, the current release PR is updated every time
-
Merging the 'release please' PR to
main:- Release please is triggered, creates a new release and updates the changelog based on the commit messages
- GoReleaser is triggered, builds the binaries and attaches them to the release
- Containers are created and pushed to the container registry
NOTE: With the next relevant merge, a new release PR will be created and the process starts again
Building the binary is as simple as running go build . in the root of the repository. If you want to build the container image, you can run docker build -t golang-ci-boilerplate -f ./Dockerfile . in the root of the repository or use any of the Makefile targets or Taskfile tasks.
# Build the binary
go build .
# Build the container image
docker build -t golang-ci-boilerplate -f ./Dockerfile .
# Build the binary and container image
make build
task cli-build
# Build the docker container
make docker-build
task docker-build- Individual PRs for distinct changes will help in better management.
- Update your PR with the latest changes in
masterbranch to keep it conflict-free. - Fill out the PR template and link the associated issue.
- Be constructive and assign yourself to the PR.
- Confirm all checks are passing.
- Clarify your doubts with the author.
- Test the changes to ensure they work as intended.
- Once all approvals are there and checks are passing, approve and merge the PR.
Build the project using go build . in the repository root, or to create a container image, use docker build -t your-cli-name -f Dockerfile ..
We use Release Please and GoReleaser to automate releases. Your merged commits will trigger this process.