Use Yarn in the react-native project (#225) #28
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 | |
# Only code merged to main with new release notes can be released as a build. | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'native_gg/android/WhatsNew/**' | |
jobs: | |
android-build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: native_gg | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/[email protected] | |
# - uses: pnpm/[email protected] | |
# with: | |
# version: 8.14.1 | |
- uses: actions/[email protected] | |
with: | |
distribution: 'temurin' # See 'Supported distributions' for available options | |
java-version: '17' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.11.0 | |
- name: Install yarn | |
run: npm install -g [email protected] | |
- name: install dependencies | |
run: yarn 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}} | |
versionName: '1.0.0' | |
- name: Setup Gradle | |
uses: gradle/[email protected] | |
- name: Execute Gradle build | |
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/[email protected] | |
with: | |
name: Signed app bundle | |
path: ${{steps.sign_app.outputs.signedReleaseFile}} | |
retention-days: 4 | |
# Distribute App to google play | |
- name: Publish to Play Store internal test track | |
uses: r0adkll/[email protected] | |
with: | |
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
packageName: com.guardianghost | |
releaseFiles: native_gg/android/app/build/outputs/bundle/release/app-release.aab | |
whatsNewDirectory: native_gg/android/WhatsNew | |
track: internal | |
# TODO: Change to completed or remove the status line once alpha or beta testing tracks are ready. | |
status: draft | |
inAppUpdatePriority: 3 |