{"id":26463771,"url":"https://github.com/ragedunicorn/github-release-maven-plugin","last_synced_at":"2025-03-19T07:16:18.425Z","repository":{"id":33045878,"uuid":"144332233","full_name":"RagedUnicorn/github-release-maven-plugin","owner":"RagedUnicorn","description":"Maven plugin for creating GitHub releases","archived":false,"fork":false,"pushed_at":"2023-12-17T16:14:07.000Z","size":135,"stargazers_count":13,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-19T07:16:13.959Z","etag":null,"topics":["github","github-api","maven","maven-plugin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RagedUnicorn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-10T21:07:09.000Z","updated_at":"2023-12-05T22:54:26.000Z","dependencies_parsed_at":"2023-01-14T23:10:45.049Z","dependency_job_id":null,"html_url":"https://github.com/RagedUnicorn/github-release-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fgithub-release-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fgithub-release-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fgithub-release-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RagedUnicorn%2Fgithub-release-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RagedUnicorn","download_url":"https://codeload.github.com/RagedUnicorn/github-release-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244375526,"owners_count":20442689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","github-api","maven","maven-plugin"],"created_at":"2025-03-19T07:16:17.759Z","updated_at":"2025-03-19T07:16:18.415Z","avatar_url":"https://github.com/RagedUnicorn.png","language":"Java","readme":"# github-release-maven-plugin\n\n\u003e A maven plugin for creating GitHub releases including the attachment of assets and release notes\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.ragedunicorn.tools.maven/github-release-maven-plugin.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.ragedunicorn.tools.maven%22%20AND%20a:%22github-release-maven-plugin%22)\n\n## Usage\n\nSetup pom.xml in project\n\n```xml\n\u003cproject\u003e\n  [...]\n  \u003cbuild\u003e\n    \u003cplugins\u003e\n      \u003cplugin\u003e\n        \u003cgroupId\u003ecom.ragedunicorn.tools.maven\u003c/groupId\u003e\n        \u003cartifactId\u003egithub-release-maven-plugin\u003c/artifactId\u003e\n        \u003cversion\u003e[version]\u003c/version\u003e\n        \u003cexecutions\u003e\n          \u003cexecution\u003e\n            \u003cid\u003edefault-cli\u003c/id\u003e\n            \u003cconfiguration\u003e\n              \u003cowner\u003eragedunicorn\u003c/owner\u003e\n              \u003crepository\u003egithub-release-test\u003c/repository\u003e\n              \u003cserver\u003egithub-oauth\u003c/server\u003e\n              \u003ctagName\u003ev0.0.1\u003c/tagName\u003e\n              \u003cname\u003eexample-release\u003c/name\u003e\n              \u003ctargetCommitish\u003emaster\u003c/targetCommitish\u003e\n              \u003cbody\u003erelease description overwritten by release notes\u003c/body\u003e\n              \u003creleaseNotes\u003esrc/main/resources/release-notes-example.md\u003c/releaseNotes\u003e\n              \u003cgenerateReleaseNotes\u003efalse\u003c/generateReleaseNotes\u003e\n              \u003cassets\u003e\n                \u003casset\u003esrc/main/resources/asset-plain-text-example.txt\u003c/asset\u003e\n                \u003casset\u003esrc/main/resources/asset-zip-example.zip\u003c/asset\u003e\n              \u003c/assets\u003e\n            \u003c/configuration\u003e\n          \u003c/execution\u003e\n        \u003c/executions\u003e\n      \u003c/plugin\u003e\n    \u003c/plugins\u003e\n  \u003c/build\u003e\n  [...]\n\u003c/project\u003e\n```\n\n| Parameter              | Required | Default Value                | Description                                                                                                                                          |\n|------------------------|----------|------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| baseUri                | false    | https://api.github.com       | The API endpoint - generally only used with GitHub Enterprise                                                                                        |\n| owner                  | true     | \u003c\u003e                           | The name of the owner of the targeted repository                                                                                                     |\n| repository             | true     | \u003c\u003e                           | The name of the targeted repository                                                                                                                  |\n| server                 | false    | \u003c\u003e                           | References a server configuration in your .m2 settings.xml. This is the preferred way for using the GitHub Api token                                 |\n| authToken              | false    | \u003c\u003e                           | Alternative of using a server configuration. The authToken can directly be placed in the plugin configuration                                        |\n| tagName                | true     | \u003c\u003e                           | The full name of the tag that should get used to create the release                                                                                  |\n| name                   | false    | [tagname]                    | The title of the release                                                                                                                             |\n| targetCommitish        | false    | master                       | Determines where the tag is created from if the tag does not already exist. It is usually better to create a tag first                               |\n| body                   | false    | [commit message last commit] | The body of the release. Essentially the release notes. Text is taken as is. For easier formatting use the releaseNotes parameter                    |\n| releaseNotes           | false    | \u003c\u003e                           | Overwrite body parameter. A file containing the text for the release notes                                                                           |\n| generateReleaseNotes   | false    | \u003c\u003e                           | When true, github will automatically generate release notes. If body/releaseNotes also specified, then they will be prepended to the generated notes |\n| assets                 | false    | \u003c\u003e                           | A list of files that are being uploaded and attached to the release                                                                                  |\n| draft                  | false    | false                        | True to create a draft (unpublished) release, false to create a published one                                                                        |\n| skip                   | false    | false                        | True for skipping the plugin                                                                                                                         |\n\n### Execute Plugin\n\n```\nmvn github-release:github-release\n```\n\n## Setup Api Token\n\nBefore the plugin can be used a GitHub personal access token needs to be generated.\n\nSee GitHub's [documentation](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/) for how to create such a token.\n\n**Note:** It is recommended to limit the token to only the permissions that are absolutely needed.\n\nThe following permissions are required:\n\n* repo  Full control of private repositories\n  * repo:status  Access commit status\n  * repo_deployment  Access deployment status\n  * public_repo  Access public repositories\n\nOnce the Api token is generated, it can be provided to the plugin via:\n* the `GITHUB_TOKEN` environment variable\n* a maven server\n* a configuration property\n\nTo provide it via a maven server, store it inside the maven `.m2/settings.xml`.\n\n ```xml\n\u003cserver\u003e\n  \u003cid\u003egithub-oauth\u003c/id\u003e\n  \u003cpassphrase\u003etoken\u003c/passphrase\u003e\n\u003c/server\u003e\n```\n\nMake sure to use `passphrase` instead of `username`and `password` otherwise the plugin will not be able to recognize the token.\n\nThen configure the plugin with the name of the server in the `server` parameter.\n\n```xml\n\u003cconfiguration\u003e\n  ...\n  \u003cserver\u003egithub-oauth\u003c/server\u003e\n\u003c/configuration\u003e\n```\n\nIt is also possible to set the token with the parameter `authToken` directly inside the plugin configuration. This is however not recommended because those pom files are usually getting committed into source control and potentially leaking the token.\nHowever, using maven commandline this can be useful being able to overwrite this parameter with the `-D` option.\n\n```xml\n\u003cconfiguration\u003e\n  ...\n  \u003cauthToken\u003e${github.auth-token}\u003c/authToken\u003e\n\u003c/configuration\u003e\n```\n\nThen invoking via the command line\n```\nmvn github-release:github-release -D github.auth-token=[token]\n```\n\n## Test\n\nBasic tests can be executed with:\n\n```\nmvn test\n```\n\nTests are kept basic because for most of the functionality the GitHub backend is required.\n\n## Development\n\n##### IntelliJ Run Configurations\n\nThe project contains IntelliJ run configurations that can be used for most tasks. Create a folder `runConfigurations` inside the `.idea` folder and copy over all run configurations.\n\n\n##### Build Project\n\ngithub-release-maven-plugin\n\n```\nclean install\n```\n\n#### Create a Release\n\nThis project has GitHub action profiles for different Devops related work such as deployments to different places. See .github folder for details.\nThe project is deployed to three different places. Each deployment has its own Maven profile for configuration.\n\n##### GitHub Release\n\n`.github/workflows/github_release.yaml` - Creates a tag and release on GitHub\n\n##### GitHub Package Release\n\n`.github/workflows/github_package_release.yaml` - Releases a package on GitHub\n\n##### OSSRH Package Release\n\n`.github/workflows/ossrh_package_release.yaml` - Releases a package on OSSRH (Sonatype)\n\nAll steps are required to make a full release of the plugin but can be done independently of each other. The workflows have to be manually invoked on GitHub.\n\n#### Run Example\n\nThe example can be used for testing of the plugin during development. It requires some manual setup on GitHub before it can be run.\n\n* Create repository\n* Update repository owner\n* Setup oauth token\n\ngithub-release-maven-plugin/example\n\n```\nclean install\n```\n\nExecuting the plugin from a different folder won't work without also fixing the path to the release notes and any additional assets configured.\n\n**Note:** The example module is deliberately not included as default module otherwise it would execute each time the project is built.\nInstead, the module can be considered separate and independent. It is an example of how to use the plugin, and it is helpful in testing the plugin during development.\n\n\n##### Checkstyle\n\ngithub-release-maven-plugin/plugin\n\n```\nmvn checkstyle:checkstyle\n```\n\n##### PMD\n\ngithub-release-maven-plugin/plugin\n\n```\nmvn pmd:pmd\n```\n\n## Help\n\n#### Delete a Release\n\nA release can be deleted manually on the github.com website. Navigate to the release tab of the repository that you want to delete the release of.\n\n`https://github.com/[owner]/[repository]/releases`\n\nClick the title of the release that you want to delete. On the top right is a delete button.\n\n#### Delete a Tag\n\nA tag can be deleted manually or on the command line.\n\n##### CLI delete\n\n```\n# delete tag locally\ngit tag -d [tagname]\n# delete tag remotelly\ngit push origin :[tagname]\n```\n\n##### Manual delete\n\nNavigate to the tags tab on github.com.\n\n`https://github.com/[owner]/[repository]/tags`\n\nClick the name of the tag. On the top right is a delete button.\n\n**Note**: The tag will still be available locally on your machine. The next time you push the tag will show up again. If this is not desired you have to also delete the tag locally.\n\n`git tag -d [tagname]`\n\n## License\n\nCopyright (c) 2023 Michael Wiesendanger\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragedunicorn%2Fgithub-release-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fragedunicorn%2Fgithub-release-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fragedunicorn%2Fgithub-release-maven-plugin/lists"}