Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

111 #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Create android.yml
  • Loading branch information
ydfq25 authored Sep 8, 2024
commit 6f9fc7d0910b7c10230f8bc6644ef5c83a03ffac
34 changes: 34 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build and Package App

on:
push:
branches:
- main # 触发条件:当推送到 main 分支时
pull_request:
branches:
- main # 触发条件:当对 main 分支发起拉取请求时

jobs:
build:
runs-on: ubuntu-latest # 使用最新的 Ubuntu 环境

steps:
- name: Checkout code
uses: actions/checkout@v2 # 检出代码

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11' # 设置 Java 版本

- name: Build with Gradle
run: ./gradlew build # 使用 Gradle 构建项目

- name: Package APK
run: ./gradlew assembleRelease # 打包 APK

- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: my-app-apk
path: app/build/outputs/apk/release/app-release.apk # 上传生成的 APK