Skip to content

Adjust audio intensity for Karoo 3 (#287) #30

Adjust audio intensity for Karoo 3 (#287)

Adjust audio intensity for Karoo 3 (#287) #30

Workflow file for this run

name: Android Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: gradle
- name: Inject variables and secrets
env:
ANDROID_RELEASE_KEY_BASE64: ${{ secrets.ANDROID_RELEASE_KEY_BASE64 }}
ANDROID_RELEASE_KEY_ALIAS: ${{ secrets.ANDROID_RELEASE_KEY_ALIAS }}
ANDROID_RELEASE_KEY_PASSWORD: ${{ secrets.ANDROID_RELEASE_KEY_PASSWORD }}
GH_USER: ${{ secrets.GH_USER }}
GH_KEY: ${{ secrets.GH_KEY }}
run: |
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?><resources><string name=\"network_key\">${{ secrets.S_NETWORK_KEY }}</string></resources>" > app/src/main/res/values/secrets.xml
echo ${ANDROID_RELEASE_KEY_BASE64} | base64 -d > app/release-application-key
echo "RELEASE_STORE_FILE=release-application-key" >> local.properties
echo "RELEASE_STORE_PASSWORD=${ANDROID_RELEASE_KEY_PASSWORD}" >> local.properties
echo "RELEASE_KEY_ALIAS=${ANDROID_RELEASE_KEY_ALIAS}" >> local.properties
echo "RELEASE_KEY_PASSWORD=${ANDROID_RELEASE_KEY_PASSWORD}" >> local.properties
echo "gpr.user=${GH_USER}" >> local.properties
echo "gpr.key=${GH_KEY}" >> local.properties
echo "VERSION_CODE=${{ github.run_number }}" >> local.properties
echo "VERSION_NAME=${{ github.ref_name }}" >> local.properties
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Get release notes
uses: cardinalby/[email protected]
id: release-notes
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tag: ${{ github.ref_name }}
- name: Generate Manifest file
run: |
cat > app/build/release-notes<< EOF
${{ steps.release-notes.outputs.body }}
EOF
python3 .scripts/generate-manifest.py app/manifest-template.json app/build/manifest.json '${{ github.ref_name }}' '${{ github.run_number }}' app/build/release-notes
- name: Upload APK to release
uses: svenstaro/upload-release-action@v2
with:
repo_name: valterc/ki2
repo_token: ${{ secrets.GH_TOKEN }}
file: app/build/outputs/apk/release/ki2-release.apk
asset_name: ki2-release.apk
overwrite: true
- name: Upload Icon to release
uses: svenstaro/upload-release-action@v2
with:
repo_name: valterc/ki2
repo_token: ${{ secrets.GH_TOKEN }}
file: app/src/main/res/drawable/ic_icon.png
asset_name: icon.png
overwrite: true
- name: Upload Manifest to release
uses: svenstaro/upload-release-action@v2
with:
repo_name: valterc/ki2
repo_token: ${{ secrets.GH_TOKEN }}
file: app/build/manifest.json
asset_name: manifest.json
overwrite: true