From f62ae2efe85ceb394182a086bc2b6a0f5fc94d0d Mon Sep 17 00:00:00 2001 From: Alex Li Date: Fri, 22 Sep 2023 13:44:42 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20Add=20README=5FZH.md=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publishable.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publishable.yml b/.github/workflows/publishable.yml index 780c8d92a..2a78109b4 100644 --- a/.github/workflows/publishable.yml +++ b/.github/workflows/publishable.yml @@ -31,15 +31,22 @@ jobs: working-directory: ${{ matrix.directory }} run: | limit_size=$(expr 128 \* 1024) # Maximum 128kb. - readme_size=$(stat -c%s README.md) changelog_size=$(stat -c%s CHANGELOG.md) + if [ $changelog_size -gt $limit_size ]; then + echo "CHANGELOG.md exceeded the maximum size: $changelog_size > $limit_size." + exit 1 + fi + readme_size=$(stat -c%s README.md) if [ $readme_size -gt $limit_size ]; then echo "README.md exceeded the maximum size: $readme_size > $limit_size." exit 1 fi - if [ $changelog_size -gt $limit_size ]; then - echo "CHANGELOG.md exceeded the maximum size: $changelog_size > $limit_size." - exit 1 + if [ -f README_ZH.md ]; then + readme_zh_size=$(stat -c%s README_ZH.md) + if [ readme_zh_size -gt $limit_size ]; then + echo "README_ZH.md exceeded the maximum size: $readme_zh_size > $limit_size." + exit 1 + fi fi - uses: subosito/flutter-action@v2 - run: |