Added fixes for path error #2
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 Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Install required packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y coreutils findutils | |
- name: Install Android SDK | |
run: | | |
sudo apt-get install -y unzip | |
wget https://dl.google.com/android/repository/commandlinetools-linux-8092744_latest.zip -O commandlinetools.zip | |
unzip commandlinetools.zip -d $HOME/cmdline-tools | |
mkdir -p $HOME/android-sdk/cmdline-tools | |
mv $HOME/cmdline-tools/cmdline-tools $HOME/android-sdk/cmdline-tools/tools | |
echo "ANDROID_HOME=$HOME/android-sdk" >> $GITHUB_ENV | |
echo "PATH=$HOME/android-sdk/cmdline-tools/tools/bin:$HOME/android-sdk/platform-tools:$PATH" >> $GITHUB_ENV | |
yes | $HOME/android-sdk/cmdline-tools/tools/bin/sdkmanager --licenses | |
$HOME/android-sdk/cmdline-tools/tools/bin/sdkmanager "platforms;android-30" "build-tools;30.0.3" "platform-tools" | |
- name: Create Android release build | |
run: | | |
cd android | |
./gradlew assembleRelease | |
- name: Upload APK | |
uses: actions/upload-artifact@v2 | |
with: | |
name: app-release.apk | |
path: android/app/build/outputs/apk/release/app-release.apk |