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