Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
areteruhiro authored Oct 21, 2024
1 parent 1c71d3c commit 5ef3b9b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5ef3b9b

Please sign in to comment.