lib/GitHub/Receiver/Repositories/Releases.php
public function createRelease(string $tagName, string $targetCommitish = AbstractApi::BRANCH_MASTER,
                                  string $name = null, string $body = null, bool $draft = false,
                                  bool $preRelease = false): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST, [
                'tag_name'         => $tagName,
                'target_commitish' => $targetCommitish,
                'name'             => $name,
                'body'             => $body,
                'draft'            => $draft,
                'prerelease'       => $preRelease
            ]);
    }
public function createRelease(string $tagName, string $targetCommitish = AbstractApi::BRANCH_MASTER,
                                  string $name = null, string $body = null, bool $draft = false,
                                  bool $preRelease = false): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/releases',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST, [
                'tag_name'         => $tagName,
                'target_commitish' => $targetCommitish,
                'name'             => $name,
                'body'             => $body,
                'draft'            => $draft,
                'prerelease'       => $preRelease
            ]);
    }
public function createRelease ( string $ tagName , string $ targetCommitish = AbstractApi :: BRANCH_MASTER , string $ name = null , string $ body = null , bool $ draft = false , bool $ preRelease = false ) : array { return $ this -> getApi ( ) -> request ( $ this -> getApi ( ) -> sprintf ( '/repos/:owner/:repo/releases' , $ this -> getRepositories ( ) -> getOwner ( ) , $ this -> getRepositories ( ) -> getRepo ( ) ) , Request :: METHOD_POST , [ 'tag_name' => $ tagName , 'target_commitish' => $ targetCommitish , 'name' => $ name , 'body' => $ body , 'draft' => $ draft , 'prerelease' => $ preRelease ] ) ; }
Create a release

@link https://developer.github.com/v3/repos/releases/#create-a-release

@param string $tagName
@param string $targetCommitish
@param string $name
@param string $body
@param bool   $draft
@param bool   $preRelease

@return array
Create a release