diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f5ea6b23..484df45b 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -43,11 +43,12 @@ jobs: - name: Generate Version run: ./gradlew getVersion - - name: Set Version to Environment + - name: Set Environment Variables id: version-env run: | echo "version=$(cat app/build/version.txt)" >> $GITHUB_ENV echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + echo "branch_name=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV - name: Rename APK files run: | @@ -67,7 +68,7 @@ jobs: path: app/build/outputs/apk/armv7/debug/*.apk - name: CI Upload armv8 - run: node ./.github/workflows/upload.js -t "${{ secrets.TELEGRAM_BOT_TOKEN }}" -f "app/build/outputs/apk/armv8/debug/app-${{ env.version }}-armv8-${{ steps.version-env.outputs.sha_short }}.apk" --caption "A new commit has been pushed! ${{ steps.version-env.outputs.sha_short }}" --chatid "${{ secrets.TELEGRAM_CHAT_ID }}" + run: node ./.github/workflows/upload.js -t "${{ secrets.TELEGRAM_BOT_TOKEN }}" -f "app/build/outputs/apk/armv8/debug/app-${{ env.version }}-armv8-${{ steps.version-env.outputs.sha_short }}.apk" --caption "A new commit has been pushed to the ${{ steps.version-env.outputs.branch_name }} branch! ${{ steps.version-env.outputs.sha_short }}" --chatid "${{ secrets.TELEGRAM_CHAT_ID }}" - name: CI Upload armv7 run: node ./.github/workflows/upload.js -t "${{ secrets.TELEGRAM_BOT_TOKEN }}" -f "app/build/outputs/apk/armv7/debug/app-${{ env.version }}-armv7-${{ steps.version-env.outputs.sha_short }}.apk" --chatid "${{ secrets.TELEGRAM_CHAT_ID }}"