{"id":15056605,"url":"https://github.com/breadmoirai/github-release-gradle-plugin","last_synced_at":"2025-04-10T04:33:46.986Z","repository":{"id":40762894,"uuid":"98831057","full_name":"BreadMoirai/github-release-gradle-plugin","owner":"BreadMoirai","description":"A Gradle Plugin to send Releases to Github","archived":false,"fork":false,"pushed_at":"2024-01-31T16:48:53.000Z","size":499,"stargazers_count":107,"open_issues_count":13,"forks_count":26,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T05:44:09.025Z","etag":null,"topics":["github-api","gradle","gradle-plugin","groovy","unofficial"],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BreadMoirai.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-30T23:39:03.000Z","updated_at":"2025-02-12T00:43:07.000Z","dependencies_parsed_at":"2024-10-12T19:02:00.477Z","dependency_job_id":"897744fc-2752-4e3b-ae0d-32027aca6215","html_url":"https://github.com/BreadMoirai/github-release-gradle-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreadMoirai%2Fgithub-release-gradle-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreadMoirai%2Fgithub-release-gradle-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreadMoirai%2Fgithub-release-gradle-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BreadMoirai%2Fgithub-release-gradle-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BreadMoirai","download_url":"https://codeload.github.com/BreadMoirai/github-release-gradle-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248157819,"owners_count":21057072,"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-api","gradle","gradle-plugin","groovy","unofficial"],"created_at":"2024-09-24T21:54:02.134Z","updated_at":"2025-04-10T04:33:46.955Z","avatar_url":"https://github.com/BreadMoirai.png","language":"Groovy","readme":"# github-release\r\n[![Gradle Plugin Portal](https://img.shields.io/badge/version-2.5.1-blue.svg)](https://plugins.gradle.org/plugin/com.github.breadmoirai.github-release/2.5.1)\r\n\r\n\r\n[p65]: https://github.com/BreadMoirai/github-release-gradle-plugin/pull/65\r\n[p63]: https://github.com/BreadMoirai/github-release-gradle-plugin/pull/63\r\n[p62]: https://github.com/BreadMoirai/github-release-gradle-plugin/pull/62\r\n[p61]: https://github.com/BreadMoirai/github-release-gradle-plugin/pull/61\r\n[p60]: https://github.com/BreadMoirai/github-release-gradle-plugin/pull/60\r\n[i64]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/64\r\n[i53]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/53\r\n[i51]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/51\r\n[p42]: https://github.com/BreadMoirai/github-release-gradle-plugin/pull/42\r\n[p41]: https://github.com/BreadMoirai/github-release-gradle-plugin/pull/41\r\n[p38]: https://github.com/BreadMoirai/github-release-gradle-plugin/pull/38\r\n[i40]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/40\r\n[i39]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/39\r\n[i37]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/37\r\n[i36]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/36\r\n[i32]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/32\r\n[i31]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/31\r\n[i28]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/28\r\n[i27]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/27\r\n[i23]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/23\r\n[i22]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/22\r\n[i21]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/21\r\n[i20]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/20\r\n[i19]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/19\r\n[i17]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/17\r\n[i16]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/16\r\n[i14]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/14\r\n[i11]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/11\r\n[i5]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/5\r\n[i4]: https://github.com/BreadMoirai/github-release-gradle-plugin/issues/4\r\n\r\n\r\nA Gradle Plugin to send Releases to Github\r\n\r\nThis plugin is not endorsed by Github.\r\n\r\nThis plugin uses [OkHttp](http://square.github.io/okhttp/) to send a POST requests to the github api that creates a release and uploads specified assets.\r\n\r\n## Known Issues\r\nIf you are using multiple GithubRelease tasks to compose a single release, the release must be published `draft=false` with the first task. Currently, the plugin cannot find an existing release if it is a draft.  \r\nSome version numbers are skipped because of issues with the gradle plugin portal.\r\n\r\n## Changelog\r\n2.5.2\r\n- Merged [#65][p65] fixing Issue [#64][i64]\r\n\r\n2.5.1\r\n- Fixed classpath [error](https://github.com/BreadMoirai/github-release-gradle-plugin/pull/62#discussion_r1354355485)\r\n\r\n2.5\r\n- Merged [#60][p60], [#61][p61], [#62][p62], [#63][p63] (Thanks for contributing!)\r\n- Uses of CharSequence have been replaced with String \r\n\r\n2.4.1\r\n- Add support for GitHub generated release notes with `generateReleaseNotes: true`. If a name is not provided one will be generated. If a body is provided it will be pre-pended to the auto generated notes. Fixes [#51][i51].\r\n\r\n2.3.7\r\n- Update dependencies to latest version\r\n  - OkHttp 4.*, etc; Addressing [#36][i36]\r\n- Update to Gradle 7; Addressing [#40][i40]\r\n- Setting draft to `false` and running the task with an existing release will now publish the release if it is a draft. If already published, will error with `RELEASE ALREADY EXISTS`\r\n- If draft is set to `false`, task will now first create the release with draft set to `true`, upload assets, and then update the release with draft set to `false`, publishing it. Addressing [#28][i28]. Does not work if steps are split up into separate tasks\r\n- Added recipes for configuring tasks addressing [#39][i39]\r\n- Merged [#38][p38], [#41][p41], [#42][p42]\r\n\r\n2.2.12\r\n- Address [#32][i32] Exposed the OkHttpClient with `client`.\r\n\r\n2.2.11\r\n- Address [#31][i31] Added `dryRun` property. You can set this to `true` to show run the task without actually modifying anything.\r\n- Changed internal implementation of changelog generation. Please open an issue if the behavior is unexpected.\r\n- Note that Username and Password authentication with be disabled on July 1st, 2020 for the Github API.\r\n \r\n2.2.10\r\n- Address [#27][i27]. Http 307 Redirects are now respected.\r\n\r\n2.2.9\r\n- Address [#21][i21] \u0026 [#23][i23]. Multiple assets were being mistakenly uploaded with the same name.\r\n- Address [#22][i22]. Remove deprecated gradle api call for list property.\r\n \r\n2.2.8\r\n- Address [#20][i20]. Change minimum supported version for Gradle to 4.10+ down from 5.x\r\n\r\n2.2.7\r\n- Address [#19][i19]. Replaced mime type detector with Apache Tika.\r\n\r\n2.2.6\r\n- Address [#14][i14] with new property [`apiEndpoint`](https://github.com/BreadMoirai/github-release-gradle-plugin/wiki#apiEndpoint)\r\n\r\n2.2.5\r\n- Removed unnecessary urls in logging\r\n- Address [#17][i17] by setting default values elsewhere\r\n- Address [#16][i16] by applying changes as suggested \r\n\r\n2.2.4\r\n- Changed `implementation` to `compile` as per [#11][i11]\r\n\r\n2.2.3\r\n- Updated for Gradle 5.x\r\n\r\n2.2.2\r\n- new option [`allowUploadToExisting`](https://github.com/BreadMoirai/github-release-gradle-plugin/wiki#allowUploadToExisting)\r\n\r\n2.2.1\r\n- Address [#5][i5]\r\n- Address [#4][i4] build with Java 8 \r\n\r\n2.2.0\r\n- Added more detailed information in [wiki](https://github.com/BreadMoirai/github-release-gradle-plugin/wiki)\r\n- This will no longer delete existing releases by default and must be specified with `overwrite = true`\r\n- Added ability to use username and password as shown [here](https://github.com/BreadMoirai/github-release-gradle-plugin/wiki#authorization)\r\n\r\n### Adding as a dependency\r\n\r\n[Gradle Plugin Page](https://plugins.gradle.org/plugin/com.github.breadmoirai.github-release)\r\n\r\n\r\nUsing the plugins DSL:\r\n\r\n```groovy\r\nplugins {\r\n  id \"com.github.breadmoirai.github-release\" version \"2.4.1\"\r\n}\r\n```\r\nUsing legacy plugin application:\r\n\r\n```groovy\r\nbuildscript {\r\n  repositories {\r\n    gradlePluginPortal()\r\n  }\r\n  dependencies {\r\n    classpath \"com.github.breadmoirai:github-release:2.4.1\"\r\n  }\r\n}\r\n\r\napply plugin: \"com.github.breadmoirai.github-release\"\r\n```\r\n\r\n\r\n\r\n## Using this plugin\r\n\r\n```groovy\r\ngithubRelease {\r\n    token \"\u003cyour token\u003e\" // This is your personal access token with Repo permissions\r\n                         // You get this from your user settings \u003e developer settings \u003e Personal Access Tokens\r\n    owner \"breadmoirai\" // default is the last part of your group. Eg group: \"com.github.breadmoirai\" =\u003e owner: \"breadmoirai\"\r\n    repo \"github-release\" // by default this is set to your project name\r\n    tagName \"v1.0.0\" // by default this is set to \"v${project.version}\"\r\n    targetCommitish \"main\" // by default this is set to \"main\"\r\n    releaseName \"v1.0.0\" // Release title, by default this is the same as the tagName\r\n    generateReleaseNotes false // Generate release notes automatically, if true and body is present, body will be prepended, if name is not given, one will be generated by the tag\r\n    body \"\" // by default this is empty\r\n    draft true // by default this is true\r\n    prerelease false // by default this is false\r\n    releaseAssets jar.destinationDir.listFiles // this points to which files you want to upload as assets with your release, by default this is empty\r\n    allowUploadToExisting.set false // Setting this to true will allow this plugin to upload artifacts to a release if it found an existing one. If overwrite is set to true, this option is ignored.  \r\n    overwrite false // by default false; if set to true, will delete an existing release with the same tag and name\r\n    dryRun false // by default false; you can use this to see what actions would be taken without making a release\r\n    apiEndpoint \"https://api.github.com\" // should only change for github enterprise users\r\n    client // This is the okhttp client used for http requests\r\n}\r\n```\r\nView more information on each field at the [WIKI](https://github.com/BreadMoirai/github-release-gradle-plugin/wiki)\r\n\r\nFor additional info on these fields please see the [Github API specification](https://developer.github.com/v3/repos/releases/#create-a-release).\r\n\r\n\r\n### Additional Tips:\r\n\r\nYou can use a provider with a closure to defer evaluation.\r\n```groovy\r\nbody provider({\r\n    //do something intensive\r\n    return \"wow\"\r\n})\r\n```\r\n#### [Body Changelog](https://github.com/BreadMoirai/github-release-gradle-plugin/wiki#changelog)\r\nThis plugin also provides a way to retrieve a list of commits since your last release. This uses the commandline to call git \r\n```groovy\r\nbody provider(changelog())\r\n// or\r\nbody provider { \"\"\"\\\r\n## CHANGELOG\r\n${changelog().call()}\r\n\"\"\" }\r\n```\r\nThe changelog can be modified as follows\r\n```groovy\r\nbody provider(changelog {\r\n    currentCommit \"HEAD\"\r\n    lastCommit \"HEAD~10\"\r\n    options([\"--format=oneline\", \"--abbrev-commit\", \"--max-count=50\", \"graph\"])\r\n})\r\n```\r\nYou can also apply string operations to the result.\r\n```groovy\r\nbody provider({ \"\"\"\\\r\n# Info\r\n...\r\n\r\n## ChangeLog\r\n${changelog().call().replace('\\n', '\\n* ')}\r\n\"\"\" })\r\n```\r\n\r\n\r\n#### Token\r\nYou can store your token in a gradle.properties located in either `USER/.gradle` or in the project directory and then retrieve it with `getProperty('github.token')`\r\n\r\n#### Release Assets\r\nYou can avoid removing irrelevant files from your selected directory each time you publish a release by using a filter. \r\nFor Example \r\n```groovy\r\nFilenameFilter filter = { dir, filename -\u003e filename.contains(project.version) }\r\nreleaseAssets jar.destinationDir.asFileTree.listFiles filter\r\n// or\r\nreleaseAssets jar.archiveFile\r\n```\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreadmoirai%2Fgithub-release-gradle-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbreadmoirai%2Fgithub-release-gradle-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreadmoirai%2Fgithub-release-gradle-plugin/lists"}