Skip to content

Commit

Permalink
Add workflow for building Android application
Browse files Browse the repository at this point in the history
  • Loading branch information
Danand committed Jul 28, 2023
1 parent 8cfc7f4 commit 0a8b456
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 3 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/release-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release Juicy Noise Android application

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'

- name: Install APT dependencies
run: |
sudo apt-get install \
-y \
--no-install-recommends \
wget \
unzip
- name: Install Android SDK
run: |
archive_name="tools.zip"
wget \
-q \
https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip \
-O "${archive_name}"
android_lib="/usr/local/lib/android"
mkdir -p "${android_lib}"
sdk_path="${android_lib}/sdk"
unzip \
"${archive_name}" \
-d "${sdk_path}"
mv "${sdk_path}/cmdline-tools" "${sdk_path}/latest"
mkdir "${sdk_path}/cmdline-tools"
mv "${sdk_path}/latest" "${sdk_path}/cmdline-tools/latest"
sdk_manager="${sdk_path}/cmdline-tools/latest/bin/sdkmanager"
chmod +x "${sdk_manager}"
echo "y" | "${sdk_manager}" --licenses
echo "y" | "${sdk_manager}" "platforms;android-34"
echo "y" | "${sdk_manager}" "build-tools;34.0.0"
echo "y" | "${sdk_manager}" "platform-tools"
export ANDROID_HOME="${sdk_path}"
- name: Build Android client
run: |
pushd "juicy-noise-android"
./gradlew assembleDebug
popd
mv \
"juicy-noise-android/app/build/outputs/apk/debug/app-debug.apk" \
"juicy-noise-${{github.ref_name}}.apk"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: '${{ secrets._GITHUB_PAT }}'
files: '*.apk'

6 changes: 3 additions & 3 deletions .github/workflows/release-vst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
| while read -r vst_dir; do
for platform_dir in "${vst_dir}/Contents/"*; do
platform="$(basename "${platform_dir}")"
archive_name="juicy-noise-fx-${platform}"
archive_name="juicy-noise-fx-${{github.ref_name}}-${platform}"
mkdir "${archive_name}"
cp -r "${vst_dir}" "${archive_name}/${vst_name}"
pushd "${archive_name}"
Expand All @@ -77,5 +77,5 @@ jobs:
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets._GITHUB_PAT }}
files: juicy-noise-fx-*.zip
token: '${{ secrets._GITHUB_PAT }}'
files: 'juicy-noise-fx-*.zip'

0 comments on commit 0a8b456

Please sign in to comment.