Update README.md #452
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: Build Android App | |
on: [push, pull_request] | |
jobs: | |
build-android: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: ['13'] | |
name: Node ${{ matrix.node }} sample | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node }} | |
registry-url: https://registry.npmjs.org/ | |
- name: Cache NPM dependencies | |
uses: actions/cache@v1 | |
with: | |
path: client/node_modules | |
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-npm-cache- | |
- name: Install and configure s3cmd | |
env: | |
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }} | |
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }} | |
run: | | |
sudo apt install s3cmd | |
printf "[default]\naccess_key = $S3_ACCESS_KEY\nsecret_key = $S3_SECRET_KEY\nhost_base = fra1.digitaloceanspaces.com\nhost_bucket = deliprods" > ~/.s3cfg | |
- name: Install yarn dependencies | |
working-directory: ./client | |
run: yarn --frozen-lockfile | |
- name: Add keystore | |
env: | |
KEY_STORE: ${{ secrets.KEY_STORE }} | |
shell: bash | |
run: 'echo $KEY_STORE | base64 --decode > ./client/android/app/aumo.keystore' | |
- name: Add release properties | |
working-directory: ./client/android | |
env: | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
ALIAS_PASSWORD: ${{ secrets.ALIAS_PASSWORD }} | |
shell: bash | |
run: './gen-release.sh' | |
- name: Build | |
working-directory: ./client/android | |
run: | | |
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | |
./gradlew assembleRelease | |
- name: Upload APK | |
run: | | |
s3cmd put -m application/octet-stream client/android/app/build/outputs/apk/release/app-release.apk s3://deliprods/aumo-android-binaries/aumo.apk --acl-public |