f #339
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 | |
on: | |
push: | |
branches: ["main"] | |
tags: [v*] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
fetch-tags: "true" | |
submodules: "recursive" | |
# - name: Pull & update submodules recursively | |
# run: | | |
# git submodule update --init --recursive | |
# git submodule update --recursive --remote | |
- uses: dawidd6/action-download-artifact@v3 | |
with: | |
name: yuhaiin.aar | |
path: yuhaiin | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
workflow: go.yml | |
workflow_conclusion: success | |
branch: main | |
repo: yuhaiin/yuhaiin | |
check_artifacts: true | |
# - name: Set up Go | |
# uses: actions/setup-go@v5 | |
# with: | |
# check-latest: true | |
# go-version-file: "yuhaiin/code/go.mod" | |
# cache-dependency-path: "yuhaiin/code/go.sum" | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
cache: gradle | |
# - name: build yuhaiin aar | |
# run: | | |
# cd yuhaiin/code | |
# go get -v -u github.com/yuhaiin/kitte@$(curl -H "Accept: application/vnd.github.VERSION.sha" "https://api.github.com/repos/yuhaiin/kitte/commits/main") | |
# go get -v -u github.com/yuhaiin/yuhaiin.github.io@$(curl -H "Accept: application/vnd.github.VERSION.sha" "https://api.github.com/repos/yuhaiin/yuhaiin.github.io/commits/main") | |
# go install golang.org/x/mobile/cmd/gomobile@latest | |
# gomobile init | |
# sh ../build.sh | |
- name: Build with Gradle | |
env: | |
KEYSTORE_PATH: ${{ github.workspace }}/release.keystore | |
KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
KEYSTORE: ${{ secrets.KEYSTORE_BASE64 }} | |
run: | | |
echo ${KEYSTORE} | base64 -d > ${KEYSTORE_PATH} | |
chmod +x gradlew | |
./gradlew app:assembleRelease --stacktrace | |
- name: upload_arm64-v8a | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-arm64-v8a-release | |
path: app/build/outputs/apk/release/yuhaiin-arm64-v8a-release.apk | |
- name: upload_x86_64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-x86_64-release | |
path: app/build/outputs/apk/release/yuhaiin-x86_64-release.apk | |
- name: metadata.json | |
uses: actions/upload-artifact@v4 | |
with: | |
name: metadata.json | |
path: app/build/outputs/apk/release/output-metadata.json |