go-cli-github

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2022 License: Apache-2.0

README

Go CLI Github

Release Coverage Go Report Card

This repo is an example with basic workflows for a Go CLI tool hosted on Github. It adds basic PR building, dependabot integration, testing, coverage etc.

How to use
  1. Copy the contents of this repo into a new directory. Update the release workflow branch from main to foo to disable it, commit all the files, and push to main on a new repo.
  2. Rename cmd/go-cli-github, update .goreleaser.yml, and update the links at the top of the README. Send a PR for this change, and merge it once green.
  3. Go to repository Settings > General:
  • Disable wiki and projects
  • Allow only merge commits for Pull Requests
  • Allow auto-merge
  • Automatically delete head branches
  1. Go to repository Settings > Branches and add branch protection to main, and enable:
  • Require a PR before merging
    • Dismiss stale pull request approvals
  • Require status checks to pass before merging
    • Require branches to be up-to-date before merging.
    • Required status checks:
      • lint
      • commitlint
      • build
      • go-test
  • Include administrators
  1. Go to repository Settings > Code security and analysis, and enable:
  • Dependabot alerts
  • Dependabot security updates
  1. When ready to release, rename the target branch in the release workflow from foo to main, and send a PR.
  2. That's it.

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL