Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

โ€œInvest in yourself โ€” your confidence is always worth it.โ€

Explore Cosmetic Hospitals

Start your journey today โ€” compare options in one place.

Android app build and publishing workflow using GitHub Actions

To fully automate your Android app build and publishing workflow using GitHub Actions, we’ll break it into three main steps:


โœ… What This GitHub Action Will Do

  1. Build the APK using Gradle on a GitHub Actions runner.
  2. Upload the APK to GitHub Releases as an asset (optional: GitHub Packages if you prefer).
  3. Deploy the APK to Google Play Store – Internal/Test Track using the r0adkll/upload-google-play action.

๐Ÿ“ Prerequisites

1. Play Store Setup

  • Create a Google Play Console account.
  • Upload the initial APK manually once to create the app entry.
  • Create a Service Account with Release access and generate a JSON key file.

2. GitHub Repository Secrets

Add these secrets to your repository settings:

Secret NameDescription
ANDROID_KEYSTORE_BASE64Your keystore file, base64 encoded
ANDROID_KEYSTORE_PASSWORDKeystore password
ANDROID_KEY_ALIASKey alias
ANDROID_KEY_PASSWORDKey password
GOOGLE_PLAY_SERVICE_ACCOUNT_JSONContents of service_account.json
RELEASE_SIGNING_ENABLEDtrue or false
PACKAGE_NAMEYour appโ€™s package name (e.g., com.example.app)

๐Ÿ“œ GitHub Actions Workflow (.github/workflows/android-release.yml)

name: Android Release Pipeline

on:
  push:
    tags:
      - 'v*'  # Triggers on version tags like v1.0.0

jobs:
  build:
    name: Build APK
    runs-on: ubuntu-latest

    steps:
    - name: Checkout Code
      uses: actions/checkout@v4

    - name: Set up JDK
      uses: actions/setup-java@v3
      with:
        distribution: 'temurin'
        java-version: '17'

    - name: Decode Keystore
      if: env.RELEASE_SIGNING_ENABLED == 'true'
      run: |
        echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > my-release-key.keystore

    - name: Build APK
      run: ./gradlew assembleRelease
      env:
        KEYSTORE_FILE: my-release-key.keystore
        KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
        KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
        KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}

    - name: Upload APK to GitHub Release
      uses: softprops/action-gh-release@v2
      with:
        name: "Release ${{ github.ref_name }}"
        tag_name: ${{ github.ref_name }}
        files: app/build/outputs/apk/release/app-release.apk
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  upload_to_playstore:
    name: Upload to Google Play
    runs-on: ubuntu-latest
    needs: build

    steps:
    - name: Download Release APK from GitHub
      uses: actions/download-artifact@v4
      with:
        name: app-release.apk

    - name: Upload to Google Play (Internal)
      uses: r0adkll/upload-google-play@v1
      with:
        serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
        packageName: ${{ secrets.PACKAGE_NAME }}
        releaseFiles: app/build/outputs/apk/release/app-release.apk
        track: internal  # use 'alpha', 'beta', 'production', or 'internal'
Code language: PHP (php)

๐Ÿ“Œ Notes

  • This will auto-trigger when you push a tag like v1.0.0.
  • r0adkll/upload-google-play handles version codes and uploads the APK to the internal testing track.
  • You can switch the track to alpha, beta, or production as needed.

๐Ÿ” How to Encode Keystore

base64 your-release-key.keystore > keystore.txt
# Copy contents and store in GitHub secret: ANDROID_KEYSTORE_BASE64
Code language: CSS (css)

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
Iโ€™m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I have worked at <a href="https://www.cotocus.com/">Cotocus</a>. I share tech blog at <a href="https://www.devopsschool.com/">DevOps School</a>, travel stories at <a href="https://www.holidaylandmark.com/">Holiday Landmark</a>, stock market tips at <a href="https://www.stocksmantra.in/">Stocks Mantra</a>, health and fitness guidance at <a href="https://www.mymedicplus.com/">My Medic Plus</a>, product reviews at <a href="https://www.truereviewnow.com/">TrueReviewNow</a> , and SEO strategies at <a href="https://www.wizbrand.com/">Wizbrand.</a> Do you want to learn <a href="https://www.quantumuting.com/">Quantum Computing</a>? <strong>Please find my social handles as below;</strong> <a href="https://www.rajeshkumar.xyz/">Rajesh Kumar Personal Website</a> <a href="https://www.youtube.com/TheDevOpsSchool">Rajesh Kumar at YOUTUBE</a> <a href="https://www.instagram.com/rajeshkumarin">Rajesh Kumar at INSTAGRAM</a> <a href="https://x.com/RajeshKumarIn">Rajesh Kumar at X</a> <a href="https://www.facebook.com/RajeshKumarLog">Rajesh Kumar at FACEBOOK</a> <a href="https://www.linkedin.com/in/rajeshkumarin/">Rajesh Kumar at LINKEDIN</a> <a href="https://www.wizbrand.com/rajeshkumar">Rajesh Kumar at WIZBRAND</a> <a href="https://www.rajeshkumar.xyz/dailylogs">Rajesh Kumar DailyLogs</a>

Related Posts

Top 10 Subscription Management Software Tools in 2026: Features, Pros, Cons & Comparison

Introduction Subscription management software is designed to streamline and optimize the process of managing recurring billing, customer subscriptions, and related business operations. In 2026, with the rapid…

Read More

Top 10 AI Data Integration Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI data integration tools are pivotal for businesses navigating the complexities of modern data ecosystems. These tools combine artificial intelligence with data integration processes…

Read More

Top 10 Fleet Management Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, the logistics and transportation industries are evolving rapidly, and managing a fleet of vehicles has never been more complex. Fleet management software has become…

Read More

Top 10 AI Academic Plagiarism Checkers Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, AI academic plagiarism checkers have become indispensable tools for students, educators, researchers, and institutions striving to uphold academic integrity. With the rise of AI-generated…

Read More

Top 10 Travel Management Software Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, travel management software (TMS) has become a crucial tool for businesses, travel agencies, and frequent travelers. These tools automate the booking, tracking, and management…

Read More

Top 10 No-Code Platforms Tools in 2026: Features, Pros, Cons & Comparison

Introduction In 2026, no-code platforms have become essential for businesses and individuals looking to build powerful applications, websites, and automations without the need for programming knowledge. These…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x