Bump com.android.application from 9.3.1 to 9.4.0 #285
Workflow file for this run
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 GreenGo APK | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| JAVA_TOOL_OPTIONS: --enable-native-access=ALL-UNNAMED | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v5.7.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '25' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v6.3.0 | |
| with: | |
| build-scan-publish: true | |
| build-scan-terms-of-use-url: 'https://gradle.com/terms-of-service' | |
| build-scan-terms-of-use-agree: 'yes' | |
| - name: Validation | |
| uses: gradle/actions/wrapper-validation@v6.3.0 | |
| - name: Make gradlew executable | |
| run: chmod +x ./gradlew | |
| - name: Build release APK (unsigned) | |
| run: ./gradlew assembleRelease | |
| - name: Sign and copy APK | |
| env: | |
| SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
| KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| KEY_STORE_PASSWORD: ${{ secrets.KEY_STORE_PASSWORD }} | |
| KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }} | |
| run: | | |
| UNSIGNED=app/build/outputs/apk/release/app-release-unsigned.apk | |
| if [ -n "$SIGNING_KEY" ]; then | |
| echo "🔑 Signing APK..." | |
| echo "$SIGNING_KEY" | base64 -d > keystore.jks | |
| APKSIGNER=$(find $ANDROID_SDK_ROOT/build-tools -name apksigner | sort -V | tail -1) | |
| "$APKSIGNER" sign \ | |
| --ks keystore.jks \ | |
| --ks-key-alias "$KEY_ALIAS" \ | |
| --ks-pass pass:"$KEY_STORE_PASSWORD" \ | |
| --key-pass pass:"$KEY_PASSWORD" \ | |
| --out GreenGo.apk \ | |
| "$UNSIGNED" | |
| rm -f keystore.jks | |
| echo "✅ Signed APK ready" | |
| else | |
| cp "$UNSIGNED" GreenGo.apk | |
| echo "⚠️ No signing key — using unsigned APK" | |
| fi | |
| - name: Verify APK exists | |
| run: test -f GreenGo.apk && echo "APK ready" || (echo "APK missing" && exit 1) | |
| - name: Publish to GitHub Releases | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: v1.0.${{ github.run_number }} | |
| name: GreenGo v1.0.${{ github.run_number }} | |
| files: GreenGo.apk | |
| body: | | |
| Check [Readme](https://github.com/eliekh05/GreenGoAndroid/blob/main/README.md) for install instructions | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |