1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/www/content/actions.md
2019-01-25 21:47:17 -02:00

1.1 KiB

title menu weight
GitHub Actions true 141

GoReleaser can also be used within GitHub Actions.

You can create a workflow like this to push your releases.

workflow "Release" {
  on = "push"
  resolves = ["goreleaser"]
}

action "is-tag" {
  uses = "actions/bin/filter@master"
  args = "tag"
}

action "goreleaser" {
  uses = "docker://goreleaser/goreleaser"
  secrets = [
    "GITHUB_TOKEN",
    # at least GITHUB_TOKEN is required, you may need more though
    "DOCKER_USERNAME",
    "DOCKER_PASSWORD",
  ]
  args = "release"
  needs = ["is-tag"]
}

This should support almost everything already supported by GoReleaser's Docker image. Check the install section for more details.

What doesn't work

Projects that depend on $GOPATH. GitHub Actions override the WORKDIR instruction and it seems like we can't override it.

In the future releases we may hack something together to work around this, but, for now, only projects using Go modules are supported.