diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fac20cc..de94d64d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,12 +35,10 @@ jobs: - name: Set environments run: | - { - echo "version=v$(grep versionName app/build.gradle | awk '{print $2}' | tr -d \")" - echo "line_ver_code=$(grep HOOK_TARGET_VERSION app/build.gradle | awk '{print $4}' | tr -d \'\")" - echo "commit=$(echo ${{ github.sha }} | cut -c-7)" - echo "repo=$(echo ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/})" - } >> $GITHUB_ENV + echo "version=v$(grep versionName app/build.gradle | awk '{print $2}' | tr -d \")" >> $GITHUB_ENV + echo "line_ver_code=$(grep HOOK_TARGET_VERSION app/build.gradle | awk '{print $4}' | tr -d \'\")" >> $GITHUB_ENV + echo "commit=$(echo ${{ github.sha }} | cut -c-7)" >> $GITHUB_ENV + echo "repo=$(echo ${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/})" >> $GITHUB_ENV - name: Set LINE Original Version Name run: echo "line_ver=$(echo '${{ env.line_ver_code }}' | awk '{print substr($0,1,2)"."substr($0,3,2)"."int(substr($0,5,1))}')" >> $GITHUB_ENV @@ -65,19 +63,17 @@ jobs: - name: Release check if: github.event.inputs.release == 'true' run: | - if [ "${{ secrets.STORE_FILE }}" == "" ]; then + if [ -z "${{ secrets.STORE_FILE }}" ]; then echo -e "\nERROR!\nTo release, you need to set up a signing key!\n" echo "STORE_FILE: A Base64 encoded string of the signing key in JKS format" echo "STORE_PASSWORD: Key store password" echo "KEY_ALIAS: Key alias" echo "KEY_PASSWORD: Key password" - echo "" exit 1 fi if [ "${{ steps.previous.outputs.tag }}" == "${{ env.version }}" ]; then echo -e "\nERROR!\nThe same tag already exists!\n" echo "Please change versionName in build.gradle" - echo "" exit 1 fi @@ -108,7 +104,7 @@ jobs: echo "Patching LIME..." java -jar lspatch.jar "line-${{ env.line_ver }}.apk" -m "app/build/outputs/apk/debug/app-debug.apk" -l 2 -v || { echo "Patching failed"; exit 1; } - # ここで生成されたAPKファイルをリスト表示 + # 生成されたAPKファイルをリスト表示 echo "生成されたAPKファイル:" ls -la line-*-lspatched.apk