docs,fix: Add Software Requirements Specification using Typst and fix… #12
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: Production | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v*" | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| verify: | |
| name: Verify Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Java (For Android tools) | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "zulu" | |
| java-version: "17" | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| cache: true | |
| - name: Install Dependencies | |
| run: flutter pub get | |
| - name: Check Formatting | |
| run: dart format . | |
| - name: Static Code Analysis | |
| run: flutter analyze | |
| - name: Run Unit & Widget Tests | |
| run: flutter test --coverage | |
| build-android: | |
| name: Build Production Android | |
| needs: verify | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "zulu" | |
| java-version: "17" | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| cache: true | |
| - name: Install Dependencies | |
| run: flutter pub get | |
| - name: Generate env.json | |
| run: | | |
| cat <<EOF > env.json | |
| { | |
| "API_BASE_URL": "${{ secrets.API_BASE_URL }}" | |
| } | |
| EOF | |
| - name: Decode Android Keystore | |
| run: | | |
| echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode > android/app/upload-keystore.jks | |
| - name: Build Android App Bundle (AAB) | |
| env: | |
| KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }} | |
| KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} | |
| KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }} | |
| run: | | |
| flutter build appbundle --release \ | |
| --dart-define-from-file=env.json \ | |
| --dart-define=APP_ENV=production | |
| - name: Upload Android Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: production-appbundle | |
| path: build/app/outputs/bundle/release/app-release.aab | |
| build-ios: | |
| name: Build Unsigned iOS (Validation Only) | |
| needs: verify | |
| runs-on: macos-latest | |
| if: github.event_name == 'push' | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: "stable" | |
| cache: true | |
| - name: Install Dependencies | |
| run: flutter pub get | |
| - name: Generate env.json | |
| run: | | |
| cat <<EOF > env.json | |
| { | |
| "API_BASE_URL": "${{ secrets.API_BASE_URL }}" | |
| } | |
| EOF | |
| - name: Build iOS (Unsigned) | |
| run: | | |
| flutter build ios --release --no-codesign \ | |
| --dart-define-from-file=env.json \ | |
| --dart-define=APP_ENV=production |