.github: invoke gen-i10n.sh in build workflow #152
This file contains 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 CI | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-android: | |
name: Build Android | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- env: | |
ANDROID_STORE_KEY_PROPERTIES: | | |
${{ secrets.ANDROID_STORE_KEY_PROPERTIES }} | |
run: echo -ne "$ANDROID_STORE_KEY_PROPERTIES" > android/key.properties | |
- env: | |
GOOGLE_PLAYSTORE_JKS_BASE64: | | |
${{ secrets.GOOGLE_PLAYSTORE_JKS_BASE64 }} | |
run: echo -ne "$GOOGLE_PLAYSTORE_JKS_BASE64" | base64 --decode > android/GooglePlaystore.jks | |
- run: flutter --version | |
- run: flutter pub get | |
- run: ./gen-i10n.sh | |
- run: flutter build apk | |
- run: flutter build appbundle | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Android | |
path: | | |
build/app/outputs/flutter-apk/app-release.apk | |
build/app/outputs/bundle/release/app-release.aab | |
build-ios: | |
name: Build iOS | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
architecture: x64 | |
- run: flutter --version | |
- run: flutter pub get | |
- run: ./gen-i10n.sh | |
- run: flutter build ios --release --no-codesign | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: iOS | |
path: build/ios/iphoneos/Runner.app | |
build-web: | |
name: Build Web | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- run: flutter --version | |
- run: flutter pub get | |
- run: ./gen-i10n.sh | |
- run: flutter build web | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Web | |
path: build/web | |
build-windows: | |
name: Build Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- run: flutter --version | |
- run: flutter pub get | |
- run: cmd /c win-gen-i10n.bat | |
- run: flutter config --enable-windows-desktop | |
- run: flutter build windows | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Windows | |
path: build\windows\x64\runner\Release\NWT_Reading.exe | |
build-linux: | |
name: Build Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
- run: | | |
sudo apt-get update -y | |
sudo apt-get install -y ninja-build libgtk-3-dev | |
- run: flutter --version | |
- run: flutter pub get | |
- run: ./gen-i10n.sh | |
- run: flutter config --enable-linux-desktop | |
- run: flutter build linux | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Linux | |
path: build/linux/x64/release/bundle/nwt_reading | |
build-macos: | |
name: Build macOS | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
architecture: x64 | |
- run: flutter --version | |
- run: flutter pub get | |
- run: ./gen-i10n.sh | |
- run: flutter config --enable-macos-desktop | |
- run: flutter build macos | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: macOS | |
path: build/macos/Build/Products/Release/NWT Reading.app |