Merge pull request #29 from SafeEscape-org/UpdatedContactPage #40
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: Android Build | |
| on: | |
| push: | |
| branches: [main, master, develop] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v3 | |
| - name: Setup Java | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '17' | |
| # Updated to match your local Flutter version | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.27.1' | |
| channel: 'stable' | |
| cache: true | |
| - name: Verify Flutter Installation | |
| run: flutter doctor | |
| - name: Get Dependencies | |
| run: flutter pub get | |
| # Set up signing configuration | |
| - name: Setup Keystore | |
| run: | | |
| echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 --decode > android/app/keystore.jks | |
| # Create key.properties file | |
| echo "storeFile=keystore.jks" > android/key.properties | |
| echo "storePassword=${{ secrets.KEYSTORE_PASSWORD }}" >> android/key.properties | |
| echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties | |
| echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties | |
| - name: Build APK | |
| run: flutter build apk --release | |
| # Fixed the deprecated set-output command | |
| - name: Upload APK | |
| id: upload | |
| run: | | |
| mkdir -p ${{ github.workspace }}/artifacts | |
| cp build/app/outputs/flutter-apk/app-release.apk ${{ github.workspace }}/artifacts/ | |
| echo "artifact_path=${{ github.workspace }}/artifacts/app-release.apk" >> $GITHUB_OUTPUT |