Skip to content

update Lua. [skip CI] #901

update Lua. [skip CI]

update Lua. [skip CI] #901

Workflow file for this run

name: Android
on:
push:
branches: [ main ]
tags: 'v*.*.*'
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/') || (!contains(github.event.head_commit.message, '[skip CI]') && !contains(github.event.head_commit.message, '[skip Android]'))"
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Generate Lua bindings
run: |
sudo apt-get install lua5.1
sudo apt-get install -y luarocks
sudo luarocks install luafilesystem
cd ./Tools/tolua++
lua tolua++.lua
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'
- name: Build Android
if: "!startsWith(github.ref, 'refs/tags/')"
run: cd Project/Android/Dora && ./gradlew assembleDebug
- name: Pack Android
if: startsWith(github.ref, 'refs/tags/')
run: |
cd Tools/YarnEditor && yarn && yarn build-linux && rm -rf ../dora-dora/public/yarn-editor && mv dist ../dora-dora/public/yarn-editor && cd ../..
cd Tools/dora-dora && yarn && yarn build && cd ../.. && rm -rf Assets/www && mv Tools/dora-dora/build Assets/www
echo "${{ secrets.KEYSTORE_B64 }}" | base64 -d > $GITHUB_WORKSPACE/signing-key.jks
cd Project/Android/Dora
./gradlew assembleRelease -Pandroid.injected.signing.store.file=$GITHUB_WORKSPACE/signing-key.jks -Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} -Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} -Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }}
mv app/build/outputs/apk/release/app-release.apk $GITHUB_WORKSPACE/dora-ssr-${{ github.ref_name }}-android.apk
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dora-ssr-${{ github.ref_name }}-android.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}