From 878e7b42479c6becbcc4070f3a07aa24b87e567b Mon Sep 17 00:00:00 2001 From: sadorowo Date: Wed, 20 Mar 2024 20:03:00 +0100 Subject: [PATCH] fix: github actions (attempt 3) --- .github/workflows/android.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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