logo
GoReleaser
Environment Variables
Initializing search
    goreleaser/goreleaser
    goreleaser/goreleaser
    • Home
    • Introduction
    • Install
    • Quick Start
    • Environment
      • CGO
      • Semantic Versioning
      • About
      • GitHub Actions
      • CircleCI
      • Cirrus CI
      • Google CloudBuild
      • Codefresh
      • Drone
      • GitLab CI
      • Jenkins
      • Semaphore
      • Travis CI
      • About
      • Archive
      • Artifactory
      • Bintray
      • Blobs
      • Go Modules
      • Builds
      • Checksum
      • Custom Publishers
      • Docker
      • Docker Manifest
      • Environment Variables
      • Global Hooks
      • Homebrew
      • HTTP Upload
      • Name Templates
      • Milestone
      • NFPM
      • Project Name
      • Release
      • Scoop
      • Signing
      • Snapcraft
      • Snapshots
      • Source Archive
    • Deprecation notices
    • Sponsors
    • Contributing
      • About
      • Blog Posts
      • Building Go modules
      • Semantic Release
      • Release a library
      • Publish to Nexus
      • Cross-compiling Go with CGO
      • Use debconf and templates
    • Links

    Environment Variables

    Global environment variables to be passed down to all hooks and builds.

    This is useful for GO111MODULE, for example. You can have your .goreleaser.yml file like the following:

    # .goreleaser.yml
    env:
      - GO111MODULE=on
    before:
      hooks:
        - go mod tidy
    builds:
    - binary: program
    

    This way, both go mod tidy and the underlying go build will have GO111MODULE set to on.

    Previous Docker Manifest
    Next Global Hooks
    Made with ❤️ by GoReleaser contributors.
    Made with Material for MkDocs