diff --git a/www/content/ci.md b/www/content/ci.md index 7c0936c22..4c54de0b2 100644 --- a/www/content/ci.md +++ b/www/content/ci.md @@ -99,6 +99,44 @@ In this example we're creating a new release every time a new tag is pushed. Note that you'll need to enable `tags` in repo settings and add `github_token` secret. +#### 1.x +``` +kind: pipeline +name: default + +steps: + - name: fetch + image: docker:git + commands: + - git fetch --tags + + - name: test + image: golang + volumes: + - name: deps + path: /go + commands: + - go test -race -v ./... -cover + + - name: release + image: golang + environment: + GITHUB_TOKEN: + from_secret: github_token + volumes: + - name: deps + path: /go + commands: + - curl -sL https://git.io/goreleaser | bash + when: + event: tag + +volumes: + - name: deps + temp: {} +``` + +#### 0.8 ```yml pipeline: clone: @@ -354,4 +392,4 @@ steps: You need to pass the variable `GITHUB_TOKEN` in the Codefresh UI that contains credentials to your Github account or load it from [shared configuration](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/shared-configuration/). You should also restrict this pipeline to run only on tags when you add [git triggers](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/triggers/git-triggers/) on it. -More details can be found in the [goreleaser example page](https://codefresh.io/docs/docs/learn-by-example/golang/goreleaser/). \ No newline at end of file +More details can be found in the [goreleaser example page](https://codefresh.io/docs/docs/learn-by-example/golang/goreleaser/).