I have to create a release by using the create-release action provided by GitHub actions. The default config parameters in the build.gradle file like the following;
defaultConfig {
applicationId "com.example.myapp"
minSdk 21
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
and the action in the GitHub Actions yml file like the following;
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: <I need gradle version name here! It is 1.0>
release_name: Release <I need gradle version name here! It is 1.0>
body: |
Release body
draft: false
prerelease: false
How can I get the gradle versionName in the GitHub Actions yml file to create a GitHub release?