Add package README when publishing to github registery (maven)

Is there a way to specify the package README when publishing artifacts using gradle? (Or using the github API)

If the you have created the README.md file in the root of the project, you can try using _ maven-resources-plugin _ to copy README.md from the root directory to ${baseDir}/src/site/markdown.
Detailed configurations in pom.xml as below, navigate to section _ project.build.plugins _:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-resources-plugin</artifactId>
    <executions>
        <execution>
            <!-- Copy the readme file to the site source files so that a page is generated from it. -->
            <id>copy-readme</id>
            <phase>pre-site</phase>
            <goals>
                <goal>copy-resources</goal>
            </goals>
            <configuration>
                <outputDirectory>${basedir}/src/site/markdown</outputDirectory>
                <resources>
                    <resource>
                        <directory>${basedir}</directory>
                        <includes>
                            <include>README.md</include>
                        </includes>
                    </resource>
                </resources>
            </configuration>
        </execution>
    </executions>
</plugin>

You also can reference here: https://github.com/hobrasoft-cz/PDFMU/commit/6107687d94a9c439459b943031357c5e0632699a