From 94b2860f2f03e77351bcff733ce3542f08af0626 Mon Sep 17 00:00:00 2001 From: fengyuecanzhu <1021300691@qq.com> Date: Sun, 20 Jun 2021 21:12:11 +0800 Subject: [PATCH] update actions --- .github/workflows/reader.yml | 56 ++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/reader.yml b/.github/workflows/reader.yml index 562e7a1..f30be06 100644 --- a/.github/workflows/reader.yml +++ b/.github/workflows/reader.yml @@ -38,37 +38,37 @@ jobs: name: FYReader-apk path: ${{ github.workspace }}/app/build/outputs/apk/release/*.apk - name: Prepare config - id: config - run: | - echo "获取是否需要创建release并获取配置" - source ${{ github.workspace }}/app/version_code.properties - version=$VERSION_CODE - hun=$(expr ${version} / 100) - ten=$(expr ${version} / 10) - ten=$(expr ${ten} % 10) - one=$(expr ${version} % 10) - versionN=$hun.$ten.$one + id: config + run: | + echo "获取是否需要创建release并获取配置" + source ${{ github.workspace }}/app/version_code.properties + version=$VERSION_CODE + hun=$(expr ${version} / 100) + ten=$(expr ${version} / 10) + ten=$(expr ${ten} % 10) + one=$(expr ${version} % 10) + versionN=$hun.$ten.$one - echo ::set-output name=need_create_release::"$NEED_CREATE_RELEASE" - echo ::set-output name=version_name::"$versionN" + echo ::set-output name=need_create_release::"$NEED_CREATE_RELEASE" + echo ::set-output name=version_name::"$versionN" - if [[ $NEED_CREATE_RELEASE == "true" ]];then - echo ::set-env name=LANZOU_FOLDER_ID::"1608604" - echo ::set-env name=LANZOU_SHARE_URL::"https://fycz.lanzoui.com/b00ngso7e" - fi + if [[ $NEED_CREATE_RELEASE == "true" ]];then + echo ::set-env name=LANZOU_FOLDER_ID::"1608604" + echo ::set-env name=LANZOU_SHARE_URL::"https://fycz.lanzoui.com/b00ngso7e" + fi - path="$GITHUB_WORKSPACE/app/build/outputs/apk/release" - files=$(ls $path) - for f in $files - do - if [[ $f == *"apk" ]]; then - file=$f - echo "[$(date -u -d '+8 hour' '+%Y.%m.%d %H:%M:%S')] 文件:$file" - break - fi - done - echo ::set-output name=file_name::"$file" - echo ::set-output name=file_path::"$path/$file" + path="$GITHUB_WORKSPACE/app/build/outputs/apk/release" + files=$(ls $path) + for f in $files + do + if [[ $f == *"apk" ]]; then + file=$f + echo "[$(date -u -d '+8 hour' '+%Y.%m.%d %H:%M:%S')] 文件:$file" + break + fi + done + echo ::set-output name=file_name::"$file" + echo ::set-output name=file_path::"$path/$file" - name: Create Release id: create_release if: ${{ steps.config.outputs.need_create_release == "true" }}