Skip to content

Android build

Android build #75

Workflow file for this run

name: Android build
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Dependencies
run: |
npm install -g npm@8
npm run install:all
- name: Install dependencies
run: npm install
- name: Setup Java v1.8
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Add SDK path to settings
run: 'echo "sdk.dir = /usr/local/lib/android/sdk" > ./mobile/android/local.properties'
- name: Add .env file
env:
ENVIRONMENT: ${{ secrets.MOBILE_ENVIRONMENT }}
API_URL: ${{ secrets.MOBILE_API_URL }}
BASE_URL: ${{ secrets.MOBILE_BASE_URL }}
run: 'echo -e "ENVIRONMENT=$ENVIRONMENT\nAPI_URL=$API_URL\BASE_URL=$BASE_URL\n" > ./mobile/.env'
- name: Build
run: cd ./mobile && cd ./android && ./gradlew clean assembleRelease
- name: Notify success in Slack channel
if: ${{ success() }}
continue-on-error: true
uses: adrey/[email protected]
with:
token: ${{ secrets.SLACK_APP_TOKEN }}
path: ./mobile/android/app/build/outputs/apk/release/app-release.apk
channel: bsa-talents-mobile-builds
initial_comment: "BSA Talents Mobile build success in branch ${{ github.ref }}!\nHere is the file:"