1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-06 03:13:48 +02:00
goreleaser/www/docs/ci/codefresh.md
Carlos Alexandro Becker d0cf457136
feat: improve verbose output (#4017)
- deprecates `--debug` in favor of `--verbose` which is clearer 
- improved some debug log outputs
- docs: update documentation to always use the `release` subcommand
(when it makes sense)
2023-05-27 00:18:39 -03:00

1.3 KiB

Codefresh

Codefresh uses Docker based pipelines where all steps must be Docker containers. Using GoReleaser is very easy via the existing Docker image.

Here is an example pipeline that builds a Go application and then uses GoReleaser.

version: '1.0'
stages:
  - prepare
  - build
  - release
steps:
  main_clone:
    title: 'Cloning main repository...'
    type: git-clone
    repo: '${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}'
    revision: '${{CF_REVISION}}'
    stage: prepare
  BuildMyApp:
    title: Compiling go code
    stage: build
    image: 'golang:1.20'
    commands:
      - go build
  ReleaseMyApp:
    title: Creating packages
    stage: release
    image: 'goreleaser/goreleaser'
    commands:
      - goreleaser release --clean

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. You should also restrict this pipeline to run only on tags when you add git triggers on it.

More details can be found in the GoReleaser example page.