This repository has been archived by the owner on Jul 2, 2024. It is now read-only.
Update gradle to v8.2.1 #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set up signing key | |
if: github.ref == 'refs/heads/main' | |
run: | | |
if [ ! -z "${{ secrets.KEY_STORE }}" ]; then | |
echo keyStorePassword='${{ secrets.KEY_STORE_PASSWORD }}' >> local.properties | |
echo keyAlias='${{ secrets.KEY_ALIAS }}' >> local.properties | |
echo keyPassword='${{ secrets.KEY_PASSWORD }}' >> local.properties | |
echo keyStore='${{ github.workspace }}/key.jks' >> local.properties | |
echo ${{ secrets.KEY_STORE }} | base64 --decode > ${{ github.workspace }}/key.jks | |
fi | |
- name: Download JBR 17 | |
run: | | |
download_url="https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk-17.0.7-linux-x64-b979.4.tar.gz" | |
wget -O $RUNNER_TEMP/jbr.tar.gz $download_url | |
- name: Set up JBR 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'jdkfile' | |
jdkFile: ${{ runner.temp }}/jbr.tar.gz | |
java-version: '17' | |
architecture: x64 | |
- name: Set up Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build with Gradle | |
run: ./gradlew assembleRelease | |
- name: Upload built apk | |
if: success() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: apk | |
path: ${{ github.workspace }}/app/build/outputs/apk/release/*.apk | |
- name: Upload mappings | |
if: success() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mapping | |
path: ${{ github.workspace }}/app/build/outputs/mapping/release |