feat(v5.8.0): 多场景专用策略续 — 10种去噪+X+锐化+CLAHE+USM+去模糊+归一化+修复+增粗+细化+归一化十一重… #738
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Android APK | |
| on: | |
| push: | |
| branches: [ android ] | |
| tags: [ 'v*' ] | |
| workflow_dispatch: | |
| # 关键:给 Release 上传权限 | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.44.2' | |
| channel: 'stable' | |
| cache: true | |
| - name: Flutter doctor | |
| run: flutter doctor -v | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Generate Keystore | |
| run: | | |
| openssl req -x509 -newkey rsa:2048 -keyout /tmp/key.pem -out /tmp/cert.pem -days 10000 -nodes -subj "/CN=WriteFont/OU=Dev/O=WriteFont/L=Shanghai/ST=Shanghai/C=CN" | |
| openssl pkcs12 -export -in /tmp/cert.pem -inkey /tmp/key.pem -out /tmp/release-key.p12 -name writefont -passout pass:writefont123 | |
| keytool -importkeystore -srckeystore /tmp/release-key.p12 -srcstoretype PKCS12 -destkeystore /tmp/release-key.jks -deststoretype JKS -srcstorepass writefont123 -deststorepass writefont123 -noprompt | |
| - name: Build APK (split per ABI) | |
| run: flutter build apk --release --split-per-abi | |
| - name: Upload APK to Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: writefont-android-apks | |
| path: build/app/outputs/flutter-apk/*.apk | |
| retention-days: 90 | |
| - name: Upload APK to Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: build/app/outputs/flutter-apk/*.apk | |
| overwrite_files: true |