mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-24 04:16:27 +02:00
Merge pull request #282 from goreleaser/release-upload
throttling file uploads
This commit is contained in:
commit
9dd2a00c30
@ -42,9 +42,14 @@ func doRun(ctx *context.Context, client client.Client) error {
|
||||
return err
|
||||
}
|
||||
var g errgroup.Group
|
||||
sem := make(chan bool, 4)
|
||||
for _, artifact := range ctx.Artifacts {
|
||||
sem <- true
|
||||
artifact := artifact
|
||||
g.Go(func() error {
|
||||
defer func() {
|
||||
<-sem
|
||||
}()
|
||||
return upload(ctx, client, releaseID, artifact)
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user