{{if not (param "release" true "Do you want a release pipeline?") -}} {{deleteFile ".github/workflows/release.yml"}} {{- end -}}
{{if (param "badges" true "Do you need badges?") -}} {{if (param "release") -}} [![releases](https://img.shields.io/github/v/release/{{param "github.owner"}}/{{param "github.repo"}}.svg?logo=github)](https://github.com/{{param "github.owner"}}/{{param "github.repo"}}/releases/latest) {{- end -}} [![reference](https://pkg.go.dev/badge/github.com/{{param "github.owner"}}/{{param "github.repo"}}.svg)](https://pkg.go.dev/github.com/{{param "github.owner"}}/{{param "github.repo"}}) [![ci](https://github.com/{{param "github.owner"}}/{{param "github.repo"}}/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/{{param "github.owner"}}/{{param "github.repo"}}/actions/workflows/ci.yml) {{- end}}
To create a new repository from this template repository for Go projects, using the GitHub CLI run:
gh extension install heaths/gh-template
gh template clone <name> --template heaths/template-golang --public
# Recommended
cd <name>
git commit -a --amend
The gh template
command will:
<name>
on GitHub.heaths/template-golang
files into that repo.<name>
in the current directory.This will create a new repo with the given <name>
in GitHub, copy the
heaths/template-golang
files into that repo, and clone it into a
subdirectory of the current directory named <name>
.
See heaths/gh-template for more information about this GitHub CLI extension.
Licensed under the MIT license.