- function createReleaseFromTag($repo, $tag_name, $config, callable $callback) {
- return $this->createRelease($repo->full_name, $tag_name, function($json) use($repo, $callback) {
- $this->uploadAssetForRelease($repo, $json, $config, $callback);
+ function createReleaseFromTag($repo, $tag_name, $config) {
+ return $this->createRelease($repo->full_name, $tag_name)->then(function($result) use($repo, $config) {
+ list($release) = $result;
+ return $this->uploadAssetForRelease($repo, $release, $config);