mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
throttling file uploads
This commit is contained in:
parent
128dfa7749
commit
93e9830ce6
@ -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