Skip to content

Changes made in both Readme files (#2016) #603

Changes made in both Readme files (#2016)

Changes made in both Readme files (#2016) #603

Workflow file for this run

name: Publishable
on:
push:
branches:
- main
- '6.0.0'
paths:
- "**.md"
- "**.yaml"
- "**.yml"
pull_request:
branches:
- main
- '6.0.0'
paths:
- "**.md"
- "**.yaml"
- "**.yml"
jobs:
publish-dry-run:
name: Publish dry-run with packages
runs-on: ubuntu-latest
strategy:
matrix:
directory: ["dio", "plugins/cookie_manager", "plugins/http2_adapter", "plugins/native_dio_adapter"]
steps:
- uses: actions/checkout@v3
- name: "Check documents file size < 128kb"
working-directory: ${{ matrix.directory }}
run: |
limit_size=$(expr 128 \* 1024) # Maximum 128kb.
changelog_size=$(stat -c%s CHANGELOG.md)
echo "CHANGELOG.md file size: $changelog_size."
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)
echo "README.md file size: $readme_size."
if [ $readme_size -gt $limit_size ]; then
echo "README.md exceeded the maximum size: $readme_size > $limit_size."
exit 1
fi
if [ -f README_ZH.md ]; then
readme_zh_size=$(stat -c%s README_ZH.md)
echo "README_ZH.md file size: $readme_zh_size."
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: |
if grep -q "flutter:" "${{ matrix.directory }}/pubspec.yaml"; then
flutter pub get
fi
- run: dart pub publish --dry-run
working-directory: ${{ matrix.directory }}