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