github.com/goreleaser/goreleaser@v1.25.1/www/docs/ci/codefresh.md (about) 1 # Codefresh 2 3 Codefresh uses Docker based pipelines where all steps must be Docker containers. 4 Using GoReleaser is very easy via the 5 [existing Docker image](https://hub.docker.com/r/goreleaser/goreleaser/). 6 7 Here is an example pipeline that builds a Go application and then uses 8 GoReleaser. 9 10 ```yaml 11 version: '1.0' 12 stages: 13 - prepare 14 - build 15 - release 16 steps: 17 main_clone: 18 title: 'Cloning main repository...' 19 type: git-clone 20 repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}' 21 revision: '${{CF_REVISION}}' 22 stage: prepare 23 BuildMyApp: 24 title: Compiling go code 25 stage: build 26 image: 'golang:1.20' 27 commands: 28 - go build 29 ReleaseMyApp: 30 title: Creating packages 31 stage: release 32 image: 'goreleaser/goreleaser' 33 commands: 34 - goreleaser release --clean 35 ``` 36 37 You need to pass the variable `GITHUB_TOKEN` in the Codefresh UI that 38 contains credentials to your GitHub account or load it from 39 [shared configuration](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/shared-configuration/). 40 You should also restrict this pipeline to run only on tags when you add 41 [git triggers](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/triggers/git-triggers/) 42 on it. 43 44 More details can be found in the 45 [GoReleaser example page](https://codefresh.io/docs/docs/learn-by-example/golang/goreleaser/).