Merge pull request #43 #275
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: Deploy to Play Store | |
| on: | |
| push: | |
| branches: | |
| - jsrastreamento | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install librsvg | |
| run: sudo apt-get update && sudo apt-get install -y librsvg2-bin | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.35.7' | |
| channel: 'stable' | |
| cache: true | |
| - name: Cache Flutter dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.pub-cache | |
| **/.dart_tool | |
| key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pub- | |
| - name: Set up Java 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| cache: 'gradle' | |
| cache-dependency-path: | # optional | |
| android/*.gradle* | |
| android/**/gradle-wrapper.properties | |
| - name: Generate icons | |
| run: | | |
| export BASE_URL="${{vars.BASE_URL}}" | |
| scripts/generate_icons.sh | |
| - name: Build | |
| run: | | |
| echo "${{ secrets.ANDROID_KEYSTORE }}" | base64 --decode > android/keystore | |
| export BUILD_NUMBER="${{ github.run_number }}" | |
| export GOOGLE_MAPS_CLIENT_ID="${{ secrets.GOOGLE_MAPS_CLIENT_ID }}" | |
| export GOOGLE_MAPS_SIGNING_SECRET="${{ secrets.GOOGLE_MAPS_SIGNING_SECRET }}" | |
| export TRACCAR_BASE_URL="https://jsrastreamento.com" | |
| ./build.sh appbundle | |
| - name: Upload AAB artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: app-release | |
| path: build/app/outputs/bundle/release/app-release.aab | |
| - name: Upload to Play Store | |
| uses: r0adkll/upload-google-play@v1 | |
| continue-on-error: true | |
| with: | |
| serviceAccountJsonPlainText: ${{ secrets.PLAY_STORE_AUTH }} | |
| packageName: com.fleetmap.jsrastreamento | |
| releaseFiles: build/app/outputs/bundle/release/app-release.aab | |
| track: internal | |
| status: draft | |