Skip to content

cy6erGn0m/github-release-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-release-plugin

Maven plugin to deploy artifacts to the GitHub releases.

Setup

  • Add git URL (SSH or https url)
    <scm>
        <connection>scm:git:git@github.com:owner/repository.git</connection>
        <tag>HEAD</tag>
    </scm>
  • Add plugin
    <pluginRepositories>
        <pluginRepository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>bintray-cy6ergn0m-maven</id>
            <name>bintray-plugins</name>
            <url>http://dl.bintray.com/cy6ergn0m/maven</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <plugins>
            <plugin>
                <groupId>cy.github</groupId>
                <artifactId>github-release-plugin</artifactId>
                <version>${plugin.version}</version>

                <configuration>
                    <tagName>${project.artifactId}-${project.version}</tagName>
                    <preRelease>true</preRelease>
                </configuration>

                <executions>
                    <execution>
                        <goals>
                            <goal>gh-upload</goal>
                        </goals>
                        <phase>deploy</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <server>
        <id>github</id>
        <username>username</username>
        <password>(your token here)</password>
    </server>

Note: you can use password encryption as well, see Maven Password Encryption Guide for details.

Deploy releases

To deploy to github use mvn deploy or use Maven Release Plugin

You also can launch plugin directly mvn package github-release-plugin:gh-upload

Plugin configuration options

Option System property Default value Description
skip maven.deploy.skip false Skip deployment, notice that system property will skip all deployments and will affect all plugins
serverId github server id in settings.xml
endpointURL https://api.github.com URL of github API, also could be specified via settings.xml server entry
owner github repository owner, overrides scm tag
repository github repository id
tagName ${project.version} git tag to be used to create release from
releaseTitle ${project.version} title of release
preRelease false If true then release will be marked with red prerelese badge

About

Maven plugin for uploading artifacts to the GitHub releases

Resources

License

Stars

Watchers

Forks

Packages

No packages published