Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.41 KB

README.md

File metadata and controls

38 lines (26 loc) · 1.41 KB

Github Releases

This configuration is for create releases and release assets to Github releases. Release assets will include the ProGard mapping files generated when building the project.

Setup

1. Add your repository's environment variables

You first need to add the following environment variables to your project:

// the token you have generated that can be used to access the GitHub API
// https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.
GITHUB_RELEASES_TOKEN="Access token"
GITHUB_RELEASES_API_URL="https://api.github.com/repos"
GITHUB_RELEASES_REPO_OWNER="Repository owner"
GITHUB_RELEASES_REPO="Repository name"

2. Apply the plugin

Apply the plugin in your top-level build.gradle file.

apply from: 'config/publish/releases/github-api.gradle'

3. Run the release gradle task

./gradlew build githubRelease

This will do the following:

  • Create a new Github release with the current version name. If a tag with the same name already exists, the task will fail with Status: 422 Unprocessable Entity server error.
  • Upload the modules mappings zip file to Github Releases assets. If a file with the same name already exists, the task will fail with Status: 422 Unprocessable Entity server error.