github.com/droot/goreleaser@v0.66.2-0.20180420030140-c2db5fb17157/docs/045-hooks.md (about) 1 --- 2 title: Global Hooks 3 --- 4 5 Some builds may need pre-build steps before building, e.g. `go generate`. 6 The `before` section allows for global hooks which will be executed before 7 the build is started. 8 9 The configuration is very simple, here is a complete example: 10 11 ```yml 12 # .goreleaser.yml 13 before: 14 hooks: 15 - make clean 16 - go generate ./... 17 ``` 18 19 If any of the hooks fails the build process is aborted.