Don't try and make a release commit #8
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: Android Build CI/CD | |
on: | |
push: | |
jobs: | |
android-build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: native_gg | |
timeout-minutes: 20 | |
steps: | |
- uses: actions/[email protected] | |
- uses: pnpm/[email protected] | |
with: | |
version: 8.12.1 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: '21' | |
- name: install dependencies | |
run: pnpm install --frozen-lockfile | |
# Automatically overrides the version code and version name through the github actions | |
- name: Bump version | |
uses: chkfung/[email protected] | |
with: | |
gradlePath: native_gg/android/app/build.gradle | |
versionCode: ${{github.run_number}} | |
- name: Install Dependencies | |
run: pnpm install --frozen-lockfile | |
# - name: Run Unit Test | |
# run: ./gradlew test | |
# cache Gradle dependencies and wrapper to reduce build time | |
- name: Cache Gradle Wrapper | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
- name: Cache Gradle Dependencies | |
uses: actions/[email protected] | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-caches- | |
- name: Make Gradlew Executable | |
run: cd android && chmod +x ./gradlew | |
# Building and signing App | |
- name: Build Android App Bundle | |
run: cd android && ./gradlew bundleRelease | |
- name: Sign ABB | |
uses: r0adkll/sign-android-release@v1 | |
# ID used to access action output | |
id: sign_app | |
with: | |
releaseDirectory: native_gg/android/app/build/outputs/bundle/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Signed app bundle | |
path: ${{steps.sign_app.outputs.signedReleaseFile}} | |
retention-days: 4 | |
# - name: Create Release | |
# id: create_release | |
# uses: actions/[email protected] | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
# with: | |
# tag_name: ${{ github.run_number }} | |
# release_name: Release V${{ github.run_number }} | |
# draft: false | |
# prerelease: false | |
- name: Upload Release AAB | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{steps.sign_app.outputs.signedReleaseFile}} | |
asset_name: app-release-v${{ github.run_number }}.zip | |
asset_content_type: application/zip | |
# Distribute App to google play | |
- name: Publish to Play Store internal test track | |
uses: r0adkll/[email protected] | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.ANDROID_SERVICE_ACCOUNT_JSON }} | |
packageName: com.artery | |
releaseFiles: native_gg/android/app/build/outputs/bundle/release/app-release.aab | |
track: internal | |
inAppUpdatePriority: 3 | |