From a6545d695ed3113ec1f5e2ec4535ee8a5e20a2b4 Mon Sep 17 00:00:00 2001 From: pppscn <35696959@qq.com> Date: Mon, 1 Aug 2022 15:46:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=EF=BC=9A`=E6=AF=8F=E5=A4=9C?= =?UTF-8?q?=E6=9E=84=E5=BB=BA`=E8=B0=83=E6=95=B4=E4=B8=BA`=E6=AF=8F?= =?UTF-8?q?=E5=91=A8=E6=9E=84=E5=BB=BA`=EF=BC=88=E6=AF=8F=E5=91=A8?= =?UTF-8?q?=E5=A4=A923=E7=82=B9=E5=90=AF=E5=8A=A8=E7=BC=96=E8=AF=91?= =?UTF-8?q?=EF=BC=8C=E9=81=BF=E5=85=8D=E7=A9=BA=E9=97=B4=E7=88=86=E6=BB=A1?= =?UTF-8?q?=E9=99=90=E9=80=9F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/Delete_Old_Workflow_Runs.yml | 8 +- .github/workflows/Release.yml | 10 +-- .../{Nightly_Build.yml => Weekly_Build.yml} | 88 +++++++++---------- 3 files changed, 52 insertions(+), 54 deletions(-) rename .github/workflows/{Nightly_Build.yml => Weekly_Build.yml} (81%) diff --git a/.github/workflows/Delete_Old_Workflow_Runs.yml b/.github/workflows/Delete_Old_Workflow_Runs.yml index 4da3571a..2f1c48d9 100644 --- a/.github/workflows/Delete_Old_Workflow_Runs.yml +++ b/.github/workflows/Delete_Old_Workflow_Runs.yml @@ -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' \ No newline at end of file diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index a5ffa543..709fadb9 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -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 diff --git a/.github/workflows/Nightly_Build.yml b/.github/workflows/Weekly_Build.yml similarity index 81% rename from .github/workflows/Nightly_Build.yml rename to .github/workflows/Weekly_Build.yml index d052575d..7b95b7f8 100644 --- a/.github/workflows/Nightly_Build.yml +++ b/.github/workflows/Weekly_Build.yml @@ -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