diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 44c90816..ff38469b 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -20,21 +20,23 @@ jobs: steps: - uses: actions/checkout@v3 - # Set Current Date As Env Variable - name: Set current date as env variable run: echo "date_today=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - # Set Repository Name As Env Variable - name: Set repository name as env variable run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV - - name: Set Up JDK + - name: Set up JDK uses: actions/setup-java@v3 with: distribution: 'zulu' # See 'Supported distributions' for available options java-version: '17' cache: 'gradle' + - name: Get app version + id: get_version + run: echo ::set-output name=version_name::$(grep -oP 'versionName "\K(.*)(?=")' ${{ env.main_project_module }}/build.gradle)) + - name: Change wrapper permissions run: chmod +x ./gradlew @@ -47,7 +49,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} + tag_name: v${{ steps.get_version.outputs.version_name }} release_name: Release ${{ github.ref }} draft: false prerelease: false