|
|
|
@ -1,44 +1,44 @@
|
|
|
|
|
name: Nightly Build
|
|
|
|
|
|
|
|
|
|
# 触发器
|
|
|
|
|
on:
|
|
|
|
|
schedule:
|
|
|
|
|
- cron: '30 15 * * *' #每天在国际标准时间14点(北京时间+8,即 23:30)
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
inputs:
|
|
|
|
|
root_sol:
|
|
|
|
|
description: "Nightly Build Title"
|
|
|
|
|
required: true
|
|
|
|
|
default: "SmsForwarder"
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
# if: github.event.repository.owner.id == github.event.sender.id
|
|
|
|
|
|
|
|
|
|
# 设置jdk环境为11
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- name: set up JDK 11
|
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
|
with:
|
|
|
|
|
java-version: 11
|
|
|
|
|
# ref: dev
|
|
|
|
|
# 获取打包秘钥
|
|
|
|
|
- name: Checkout Android Keystore
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
with:
|
|
|
|
|
repository: pppscn/keystore
|
|
|
|
|
token: ${{ secrets.TOKEN }} # 连接仓库的token,需要单独配置
|
|
|
|
|
path: keystore # 仓库的根目录名
|
|
|
|
|
# 打包release
|
|
|
|
|
- name: Build with Gradle
|
|
|
|
|
run: bash ./gradlew assembleRelease
|
|
|
|
|
# 存档打包的文件
|
|
|
|
|
- name: Archive production artifacts
|
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
|
with:
|
|
|
|
|
name: SmsForwarder Nightly Build
|
|
|
|
|
path: app/build/outputs/apk/release/*.apk
|
|
|
|
|
if-no-files-found: error
|
|
|
|
|
name: Weekly Build
|
|
|
|
|
|
|
|
|
|
# 触发器
|
|
|
|
|
on:
|
|
|
|
|
schedule:
|
|
|
|
|
- cron: '0 15 * * 7' #每周天在国际标准时间15点(北京时间+8,即 23:00)
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
inputs:
|
|
|
|
|
root_sol:
|
|
|
|
|
description: "Weekly Build Title"
|
|
|
|
|
required: true
|
|
|
|
|
default: "SmsForwarder"
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
# if: github.event.repository.owner.id == github.event.sender.id
|
|
|
|
|
|
|
|
|
|
# 设置jdk环境为11
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
- name: set up JDK 11
|
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
|
with:
|
|
|
|
|
java-version: 11
|
|
|
|
|
# ref: dev
|
|
|
|
|
# 获取打包秘钥
|
|
|
|
|
- name: Checkout Android Keystore
|
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
with:
|
|
|
|
|
repository: pppscn/keystore
|
|
|
|
|
token: ${{ secrets.TOKEN }} # 连接仓库的token,需要单独配置
|
|
|
|
|
path: keystore # 仓库的根目录名
|
|
|
|
|
# 打包release
|
|
|
|
|
- name: Build with Gradle
|
|
|
|
|
run: bash ./gradlew assembleRelease
|
|
|
|
|
# 存档打包的文件
|
|
|
|
|
- name: Archive production artifacts
|
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
|
with:
|
|
|
|
|
name: SmsForwarder Weekly Build
|
|
|
|
|
path: app/build/outputs/apk/release/*.apk
|
|
|
|
|
if-no-files-found: error
|