FxBlox Android Deploy #86
Workflow file for this run
This file contains 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: FxBlox Android Deploy | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
deploy-android: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' # Use the same Node.js version as your project requirements | |
- name: Set up JDK 18 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '18' | |
distribution: 'temurin' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
with: | |
packages: 'cmdline-tools;latest' | |
- name: Yarn Install | |
run: yarn install | |
- name: Ensure Symlink | |
run: npm run ensure:symlink | |
- name: Install CMake | |
run: | | |
echo "##[group]Install CMake" | |
sdkmanager --install "cmake;3.10.2.4988404" | |
yes | sdkmanager --licenses | |
echo "##[endgroup]" | |
- name: Install Android Build Tools | |
run: sdkmanager "build-tools;29.0.3" | |
- name: List Build Tools Directory | |
run: ls -la /usr/local/lib/android/sdk/build-tools/29.0.3 | |
- name: Add Build Tools to PATH | |
run: echo "/usr/local/lib/android/sdk/build-tools/29.0.3" >> $GITHUB_PATH | |
- name: Get NPM Package Version | |
run: echo "NPM_PACKAGE_VERSION=$(node -p "require('${{ github.workspace }}/apps/box/package.json').version")" >> $GITHUB_ENV | |
- name: Show GITHUB_ENV | |
run: echo $GITHUB_ENV | |
- name: Build Android Release | |
run: | | |
cd ${{ github.workspace }}/apps/box/android | |
./gradlew assembleRelease | |
- name: List Directory | |
run: ls -la ${{ github.workspace }}/apps/box/android/app/build/outputs/apk/release | |
- name: Sign APK | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: ${{ github.workspace }}/apps/box/android/app/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY_BASE64 }} | |
alias: ${{ secrets.KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
- name: Deploy to Google Play | |
uses: r0adkll/upload-google-play@v1 | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
packageName: land.fx.blox | |
releaseFiles: ${{ github.workspace }}/apps/box/android/app/build/outputs/apk/release/app-release.apk | |
track: production |