Update CHANGELOG.md #437
Workflow file for this run
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 CI build | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set output | |
id: vars | |
run: | | |
echo "short_ref=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
- name: checkout | |
id: check | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- run: chmod 777 ./gradlew | |
- name: Build JsModule | |
run: | | |
./gradlew autojs:buildJsModule | |
- name: Build Docs | |
run: | | |
pushd autojs/src/js-api | |
npm install | |
npm run docs | |
popd | |
rm -rf docs/v2/docs/nodejs/docs | |
mv autojs/src/js-api/docs docs/v2/docs/nodejs/ | |
pushd docs/v2/ | |
npm install | |
npm run build | |
popd | |
mkdir -p app/src/main/assets/docs/v2 | |
mv docs/v2/build/* app/src/main/assets/docs/v2/ | |
- name: Build inrt template | |
run: | | |
./gradlew app:buildTemplateApp | |
- name: Build App | |
run: | | |
./gradlew app:assembleV7 | |
- uses: Tlaster/android-sign@v1.2.2 | |
name: Sign app APK | |
with: | |
releaseDirectory: | | |
app/build/outputs/apk/v7/release | |
signingKeyBase64: ${{ secrets.ASIGNING_KEY }} | |
output: build/app/signed | |
alias: ${{ secrets.AALIAS }} | |
keyStorePassword: ${{ secrets.AKEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.AKEY_PASSWORD }} | |
env: | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- name: rename apk | |
run: | | |
cd build/app/signed | |
mv app-v7-arm64-v8a-release*.apk Autox-v7-arm64-v8a-release-${{steps.vars.outputs.short_ref}}.apk | |
ls | |
- name: create-gh-release | |
if: github.repository == 'kkevsekk1/AutoX' | |
uses: taiki-e/create-gh-release-action@v1 | |
with: | |
changelog: CHANGELOG.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: create-release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: 'build/app/signed/**' | |
- name: setup aliyun oss | |
if: github.repository == 'kkevsekk1/AutoX' | |
uses: manyuanrong/setup-ossutil@master | |
with: | |
endpoint: oss-cn-hangzhou.aliyuncs.com | |
access-key-id: ${{ secrets.OSS_KEY_ID }} | |
access-key-secret: ${{ secrets.OSS_KEY_SECRET }} | |
- name: update apk to aliyun | |
if: github.repository == 'kkevsekk1/AutoX' | |
run: | | |
ossutil mkdir oss://autoxjsoss/autoxjs/${{ steps.vars.outputs.short_ref }} | |
ossutil cp -rf build/app/signed oss://autoxjsoss/autoxjs/${{ steps.vars.outputs.short_ref }} |