Fix release by using github action
This commit is contained in:
parent
2df655cefe
commit
42df9afeaf
8 changed files with 210 additions and 122 deletions
|
@ -25,14 +25,22 @@ func main() {
|
|||
ParseFiles("./.goreleaser.yml.tmpl"),
|
||||
)
|
||||
|
||||
outputPath := path.Join(os.TempDir(), fmt.Sprintf(".goreleaser_%s.yml", goos))
|
||||
goarch := ""
|
||||
outputFileName := fmt.Sprintf(".goreleaser_%s.yml", goos)
|
||||
if strings.Contains(goos, "-") {
|
||||
split := strings.Split(goos, "-")
|
||||
goos = split[0]
|
||||
goarch = split[1]
|
||||
}
|
||||
|
||||
outputPath := path.Join(os.TempDir(), outputFileName)
|
||||
|
||||
output, err := os.Create(outputPath)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
err = tmpl.Execute(output, map[string]string{"GOOS": goos})
|
||||
err = tmpl.Execute(output, map[string]string{"GOOS": goos, "GOARCH": goarch})
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue