How to release mutiple builds on github action? #2111
Answered
by
caarlos0
hi20160616
asked this question in
Q&A
-
ok, guys, I asked and answered myself as the title In short: written and pass test There are Steps:
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
# - go generate ./...
builds:
- main: ./cmd/yt_fetcher/server/server.go
id: "server"
binary: server
goos:
- linux
- windows
- darwin
ignore:
- goos: linux
goarch: 386
- goos: linux
goarch: arm64
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm64
- main: ./cmd/yt_fetcher/manager/manager.go
id: "manager"
binary: manager
goos:
- linux
- windows
- darwin
ignore:
- goos: linux
goarch: 386
- goos: linux
goarch: arm64
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm64
- main: ./cmd/yt_fetcher/jobs/jobs.go
id: "jobs"
binary: jobs
goos:
- linux
- windows
- darwin
ignore:
- goos: linux
goarch: 386
- goos: linux
goarch: arm64
- goos: darwin
goarch: 386
- goos: darwin
goarch: arm64
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
name: goreleaser
on:
push:
tags:
- '*'
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.13.1' # The Go version to download (if necessary) and use.
-
name: Install GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
install-only: true
-
name: GoReleaser Release
run: goreleaser --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Beta Was this translation helpful? Give feedback.
Answered by
caarlos0
Mar 16, 2021
Replies: 1 comment 1 reply
-
This should work as is... I don't get what the question/problem is... |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
hi20160616
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should work as is... I don't get what the question/problem is...