testing releasing
This commit is contained in:
parent
720d53e65d
commit
9581d77413
33
.goreleaser.yml
Normal file
33
.goreleaser.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# This is an example goreleaser.yaml file with some sane defaults.
|
||||||
|
# Make sure to check the documentation at http://goreleaser.com
|
||||||
|
builds:
|
||||||
|
- env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- windows
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm
|
||||||
|
- arm64
|
||||||
|
ldflags:
|
||||||
|
- -X main.version={{.Version}}
|
||||||
|
archives:
|
||||||
|
- replacements:
|
||||||
|
darwin: macOS
|
||||||
|
linux: Linux
|
||||||
|
windows: Windows
|
||||||
|
386: i386
|
||||||
|
amd64: x86_64
|
||||||
|
checksum:
|
||||||
|
name_template: 'checksums.txt'
|
||||||
|
snapshot:
|
||||||
|
name_template: "{{.Tag}}"
|
||||||
|
changelog:
|
||||||
|
sort: asc
|
||||||
|
filters:
|
||||||
|
exclude:
|
||||||
|
- '^docs:'
|
||||||
|
- '^test:'
|
||||||
|
|
3
main.go
3
main.go
@ -13,6 +13,9 @@ import (
|
|||||||
"github.com/matryer/moq/pkg/moq"
|
"github.com/matryer/moq/pkg/moq"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// version is the command version, injected at build time.
|
||||||
|
var version string
|
||||||
|
|
||||||
type userFlags struct {
|
type userFlags struct {
|
||||||
outFile string
|
outFile string
|
||||||
pkgName string
|
pkgName string
|
||||||
|
28
releasing.md
Normal file
28
releasing.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Releasing
|
||||||
|
|
||||||
|
This tool uses Go Releaser to manage release builds.
|
||||||
|
|
||||||
|
## Setup
|
||||||
|
|
||||||
|
Install Go Releaser.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install goreleaser/tap/goreleaser
|
||||||
|
```
|
||||||
|
|
||||||
|
* Make a [New personal access token on GitHub](https://github.com/settings/tokens/new) and set it as the `GITHUB_TOKEN` environment variable
|
||||||
|
|
||||||
|
## Releasing
|
||||||
|
|
||||||
|
Tag the repo:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ git tag -a v0.1.0 -m "release tag."
|
||||||
|
$ git push origin v0.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
Then:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make release
|
||||||
|
```
|
Loading…
Reference in New Issue
Block a user