整理:`每夜构建`调整为`每周构建`(每周天23点启动编译,避免空间爆满限速)

pull/208/head
pppscn 2 years ago
parent cdc7856b1f
commit a6545d695e

@ -1,7 +1,7 @@
name: Delete old workflow runs
on:
schedule:
- cron: '0 0 * * *'
- cron: '59 15 * * 7' #每周天在国际标准时间15点59分(北京时间+8即 23:59)
workflow_dispatch:
inputs:
root_sol:
@ -13,19 +13,17 @@ jobs:
del_runs:
runs-on: ubuntu-latest
steps:
- name: Delete Nightly Build
- name: Delete Weekly Build
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 1
keep_minimum_runs: 1
delete_workflow_pattern: 'Nightly Build'
delete_workflow_pattern: 'Weekly Build'
- name: Delete Self
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 1
keep_minimum_runs: 1
delete_workflow_pattern: 'Delete old workflow runs'

@ -58,11 +58,11 @@ jobs:
draft: false
prerelease: false
# 存档打包的文件
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: build
path: app/build/outputs #将打包之后的文件全部上传里面会有混淆的map文件
# - name: Archive production artifacts
# uses: actions/upload-artifact@v2
# with:
# name: build
# path: app/build/outputs #将打包之后的文件全部上传里面会有混淆的map文件
# 上传至release的资源
- name: Upload release binaries
uses: alexellis/upload-assets@0.2.2

@ -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
Loading…
Cancel
Save