forked from pppscn/SmsForwarder
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.57 KB
/
Weekly_Build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Weekly Build
# 触发器
on:
schedule:
- cron: '0 15 * * 0' #每周天在国际标准时间15点(北京时间+8,即 23:00)
workflow_dispatch:
inputs:
root_sol:
description: "Weekly Build Title"
required: true
default: "SmsForwarder"
jobs:
build:
runs-on: ubuntu-latest
steps:
# 检出代码
- uses: actions/checkout@v2
# 删除旧的工作流
- name: Delete Weekly Build
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 0 # 全部删除只留正在跑的一条
keep_minimum_runs: 0 # 全部删除只留正在跑的一条
delete_workflow_pattern: 'Weekly Build'
# 设置jdk环境为11
- name: set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
# 获取打包秘钥
- 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: build/app/outputs/apk/release/*.apk
if-no-files-found: error