Skip to content

Android Release Deployment #27

Android Release Deployment

Android Release Deployment #27

name: Android Release Deployment
on:
workflow_dispatch:
# On push tags disabled for now, because we don't want to deploy on every tag push
# See https://vyahhi.myjetbrains.com/youtrack/issue/ALTAPPS-760
# push:
# tags:
# - v**
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
# Run Gradle Wrapper Validation Action to verify the wrapper's checksum
gradle-wrapper-validation:
if: ${{ github.ref == 'refs/heads/main' }}
name: Gradle Wrapper Validation
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1.1.0
# Build and submit to the Google Play
deployment:
name: Android Release Deployment
needs: gradle-wrapper-validation
runs-on: ubuntu-22.04
environment: android_production
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup CI
id: setup
uses: ./.github/actions/setup-android
with:
setup-ruby: true
git-crypt-key: ${{ secrets.GIT_CRYPT_KEY }}
release-keystore-content: ${{ secrets.HYPERSKILL_RELEASE_KEYSTORE_CONTENT }}
service-account-content: ${{ secrets.SERVICE_ACCOUNT_CONTENT }}
- name: Submit a new Release Build to the Google Play
working-directory: './androidHyperskillApp'
run: |
bundle exec fastlane release \
json_key:"${{ steps.setup.outputs.service-account-path }}" \
track:"alpha"
env:
IS_GIT_CRYPT_UNLOCKED: ${{ steps.setup.outputs.is-git-crypt-unlocked }}
HYPERSKILL_KEYSTORE_PATH: ${{ steps.setup.outputs.release-keystore-path }}
HYPERSKILL_RELEASE_STORE_PASSWORD: ${{ secrets.HYPERSKILL_RELEASE_STORE_PASSWORD }}
HYPERSKILL_RELEASE_KEY_ALIAS: ${{ secrets.HYPERSKILL_RELEASE_KEY_ALIAS }}
HYPERSKILL_RELEASE_KEY_PASSWORD: ${{ secrets.HYPERSKILL_RELEASE_KEY_PASSWORD }}
GITHUB_USER: ${{ github.actor }}
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}