mirror of
https://github.com/pppscn/SmsForwarder
synced 2025-08-03 01:17:41 +08:00
Android CI
This commit is contained in:
parent
a820971ee3
commit
f68180d41e
@ -1,4 +1,4 @@
|
||||
name: Android CI
|
||||
name: Build SmsForwarder
|
||||
|
||||
# 触发器
|
||||
on:
|
||||
@ -8,6 +8,12 @@ on:
|
||||
pull_request:
|
||||
tags:
|
||||
- v*
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
root_sol:
|
||||
description: "Release title"
|
||||
required: true
|
||||
default: "SmsForwarder"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -15,13 +21,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
# if: github.event.repository.owner.id == github.event.sender.id
|
||||
|
||||
# 设置jdk环境为1.8
|
||||
# 设置jdk环境为11
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: set up JDK 1.8
|
||||
- name: set up JDK 11
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
java-version: 11
|
||||
# ref: dev
|
||||
# 获取打包秘钥
|
||||
- name: Checkout Android Keystore
|
||||
@ -60,6 +66,12 @@ jobs:
|
||||
const str=process.env.GITHUB_REF;
|
||||
return str.substring(str.indexOf("v"));
|
||||
result-encoding: string
|
||||
# 存档打包的文件
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: build
|
||||
path: app/build/outputs #将打包之后的文件全部上传(里面会有混淆的map文件)
|
||||
# 上传至release的资源
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
@ -71,9 +83,3 @@ jobs:
|
||||
asset_path: app/build/outputs/apk/release/app-release.apk # 上传路径
|
||||
asset_name: SmsForwarder-${{steps.get-version.outputs.result}}.apk # 资源名
|
||||
asset_content_type: application/vnd.android.package-archiv #资源类型
|
||||
# 存档打包的文件
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: build
|
||||
path: app/build/outputs #将打包之后的文件全部上传(里面会有混淆的map文件)
|
@ -17,8 +17,8 @@ android {
|
||||
buildToolsVersion '30.0.3'
|
||||
compileSdkVersion 30
|
||||
compileOptions {
|
||||
sourceCompatibility 1.8
|
||||
targetCompatibility 1.8
|
||||
sourceCompatibility 11
|
||||
targetCompatibility 11
|
||||
}
|
||||
defaultConfig {
|
||||
applicationId "com.idormy.sms.forwarder"
|
||||
|
Loading…
x
Reference in New Issue
Block a user