Skip to content

goreleaser/goreleaser-azure-devops-extension

Repository files navigation

ado_goreleaser

GoReleaser: Azure DevOps Extension

Release Software License Build status

Azure DevOps

Join Discord x.com

OpenSSF Scorecard

Overview

This task allows you to easily run GoReleaser within your Azure Pipeline jobs.

Howto

See the blog article Use GoReleaser With Azure DevOps for a detailed explanation of how to use this extension in your Azure Pipeline jobs.

QuickStart

quickstart_1

Customizing

Add the plugin via Azure Pipeline Editor

quickstart_2

or directly into your azure-pipeline.yaml

quickstart_3

- task: goreleaser@0
  inputs:
    version: 'latest'
    distribution: 'goreleaser'
    args: ''
    workdir: '$(Build.SourcesDirectory)'

Inputs

Following inputs can be used

Name Type Default Description
distribution String goreleaser GoReleaser distribution, either goreleaser or goreleaser-pro
version¹ String latest GoReleaser version
args String Arguments to pass to GoReleaser
workdir String $(Build.SourcesDirectory) Working directory (below repository root)
installOnly Bool false Just install GoReleaser

¹ Can be a fixed version like v0.132.0 or a max satisfying semver one like ~> 0.132. In this case this will return v0.132.1. For the pro version, add -pro to the string

Environment variables

Following environment variables can be used, as environment variable.

Name Description
GITHUB_TOKEN GITHUB_TOKEN for e.g. brew or gofish
GORELEASER_KEY Your GoReleaser Pro License Key, in case you are using the goreleaser-pro distribution

Limitation

I think, you should either disable the release step. Or create a " dummy" repo in GitHub, so you can still use your own homebrew tap or gofish repo.

GoReleaser is not supporting Azure Artifacts currently.

You need to use Publish Pipeline Artifacts to publish the artifact inside Azure DevOps.

Tutorials

Documentation

Please refer to https://goreleaser.com/intro/ for more documentation on using GoReleaser.

Links

License

MIT

see LICENSE for details.