Added github action to build APK
This commit is contained in:
parent
46f42cb2ab
commit
895cdb9b0c
2 changed files with 41 additions and 2 deletions
39
.github/workflows/ci.yml
vendored
Normal file
39
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
name: Android CI
|
||||
|
||||
on: ["push", "pull_request"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Install Elixir
|
||||
run: |
|
||||
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
|
||||
sudo apt-get update
|
||||
sudo apt-get install esl-erlang inotify-tools
|
||||
mkdir $HOME/elixir && cd $HOME/elixir
|
||||
wget https://github.com/elixir-lang/elixir/releases/download/v1.11.4/Precompiled.zip
|
||||
unzip Precompiled.zip
|
||||
echo "$HOME/elixir/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Set up hex & rebar
|
||||
run: |
|
||||
mix local.hex --force
|
||||
mix local.rebar --force
|
||||
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
|
||||
- name: Build with Gradle
|
||||
run: bash ./gradlew assembleDebug --stacktrace
|
||||
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: app
|
||||
path: app/build/outputs/apk/debug/app-debug.apk
|
4
run_mix
4
run_mix
|
@ -13,10 +13,10 @@ else
|
|||
fi
|
||||
|
||||
if [ ! -d "assets/node_modules" ]; then
|
||||
cd assets && npm i
|
||||
cd assets && npm i && cd ..
|
||||
fi
|
||||
|
||||
mix assetsp.deploy && \
|
||||
mix assets.deploy && \
|
||||
mix release --overwrite && \
|
||||
cd _build/android_prod/rel/todo_app && \
|
||||
zip -0r $BASE/src/main/assets/app.zip lib/ releases/ --exclude "*.so" && \
|
||||
|
|
Loading…
Reference in a new issue