From 73a327b39813e7f5dbf12f5e2e26ad2e9694ea6e Mon Sep 17 00:00:00 2001 From: 10bits Date: Wed, 10 Feb 2021 22:18:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E5=BB=BA=E7=BC=93=E5=AD=98,=E6=9E=81?= =?UTF-8?q?=E9=80=9F=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 默认用的jdk11,不用设置jdk了 * 引入actions/cache@v2加快编译速度 --- .github/workflows/legado.yml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/legado.yml b/.github/workflows/legado.yml index 787d81e48..ef687f004 100644 --- a/.github/workflows/legado.yml +++ b/.github/workflows/legado.yml @@ -31,10 +31,15 @@ jobs: UPLOAD_ARTIFACT: 'true' steps: - uses: actions/checkout@v2 - - name: Set Up JDK - uses: actions/setup-java@v1 + - uses: actions/cache@v2 with: - java-version: 14 + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-legado-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-legado- + - name: Clear 18PlusList.txt run: | echo "清空18PlusList.txt" @@ -43,10 +48,11 @@ jobs: run: | echo "给apk增加签名" cp $GITHUB_WORKSPACE/.github/workflows/legado.jks $GITHUB_WORKSPACE/app/legado.jks - sed '$a\RELEASE_STORE_FILE=./legado.jks' $GITHUB_WORKSPACE/gradle.properties -i - sed '$a\RELEASE_KEY_ALIAS=legado' $GITHUB_WORKSPACE/gradle.properties -i - sed '$a\RELEASE_STORE_PASSWORD=gedoor_legado' $GITHUB_WORKSPACE/gradle.properties -i - sed '$a\RELEASE_KEY_PASSWORD=gedoor_legado' $GITHUB_WORKSPACE/gradle.properties -i + sed -e '$a\RELEASE_STORE_FILE=./legado.jks' \ + -e '$a\RELEASE_KEY_ALIAS=legado' \ + -e '$a\RELEASE_STORE_PASSWORD=gedoor_legado' \ + -e '$a\RELEASE_KEY_PASSWORD=gedoor_legado' \ + $GITHUB_WORKSPACE/gradle.properties -i - name: Apk Live Together run: | echo "设置apk共存" @@ -56,7 +62,7 @@ jobs: run: | echo "开始进行release构建" chmod +x gradlew - ./gradlew assembleAppRelease + ./gradlew assembleAppRelease --build-cache --parallel - name: Upload App To Artifact if: ${{ env.UPLOAD_ARTIFACT != 'false' }} uses: actions/upload-artifact@v2