This repository was archived by the owner on Apr 11, 2026. It is now read-only.
Archiving project #331
This file contains hidden or 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: Continuous Integration | |
| env: | |
| BUILD_NUMBER: ${{ github.run_number }} | |
| on: | |
| push: | |
| branches: [ "production" ] | |
| pull_request: | |
| concurrency: | |
| group: build-android-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🚚 Checkout PR | |
| uses: actions/checkout@v3 | |
| - name: ☕️ Set up JDK 11 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'liberica' | |
| cache: gradle | |
| - name: 🙌 Copy secrets file | |
| run: cp ./secrets.properties.example ./secrets.properties | |
| - name: 📑 Create Google Services file | |
| env: | |
| GOOGLE_SERVICES_JSON_64: ${{ secrets.GOOGLE_SERVICES_JSON_64 }} | |
| run: echo $GOOGLE_SERVICES_JSON_64 | base64 -di > ./app/google-services.json | |
| - name: 📝 Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: 👷♀️ Build with Gradle | |
| run: ./gradlew build | |
| - name: 🛜 Upload reports | |
| if: always() | |
| uses: actions/upload-artifact@v3.1.2 | |
| with: | |
| name: Lint Results | |
| path: app/build/reports/lint-results-debug.html | |
| check-gradle-wrapper: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 🚚 Checkout PR | |
| uses: actions/checkout@v3 | |
| - name: 🌯 Gradle Wrapper Validation | |
| uses: gradle/wrapper-validation-action@v1.0.6 | |
| deploy-app: | |
| runs-on: ubuntu-latest | |
| environment: Google Play Store Deployment | |
| needs: [build, check-gradle-wrapper] | |
| if: ${{ github.event_name == 'push' && github.ref_name == 'production' }} | |
| steps: | |
| - name: 🚚 Checkout PR | |
| uses: actions/checkout@v3 | |
| - name: ☕️ Set up JDK 11 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'liberica' | |
| cache: gradle | |
| - name: 🙌 Copy secrets file | |
| env: | |
| SECRETS_PROPERTIES_64: ${{ secrets.SECRETS_PROPERTIES_64 }} | |
| run: echo $SECRETS_PROPERTIES_64 | base64 -di > ./secrets.properties | |
| - name: 📑 Create Google Services file | |
| env: | |
| GOOGLE_SERVICES_JSON_64: ${{ secrets.GOOGLE_SERVICES_JSON_64 }} | |
| run: echo $GOOGLE_SERVICES_JSON_64 | base64 -di > ./app/google-services.json | |
| - name: 📝 Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: 📑 Create keystore file | |
| env: | |
| KEYSTORE_64: ${{ secrets.KEYSTORE_64 }} | |
| run: echo $KEYSTORE_64 | base64 -di > ./keys/release-keystore.jks | |
| - name: 👷♀️ Bundle Release | |
| id: bundleRelease | |
| env: | |
| STORE_PASS: ${{ secrets.STORE_PASS }} | |
| KEY_ALIAS: ${{ secrets.KEY_ALIAS }} | |
| KEY_PASS: ${{ secrets.KEY_PASS }} | |
| run: ./gradlew bundleRelease | |
| - name: 🛜 Upload Android Release to Play Store | |
| uses: r0adkll/upload-google-play@v1.1.1 | |
| with: | |
| serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }} | |
| packageName: com.drspaceboo.transtracks | |
| releaseFiles: ${{ vars.RELEASE_BUNDLE_PATH }} | |
| track: alpha | |
| mappingFile: ${{ vars.RELEASE_MAPPING_PATH }} | |
| - name: 🔖 Tag release | |
| env: | |
| TAG_NAME: 'v${{ steps.bundleRelease.outputs.VERSION_NAME }}' | |
| run: | | |
| git config --global user.name "Continuous Integration" | |
| git config --global user.email "username@users.noreply.github.com" | |
| git tag "$TAG_NAME" | |
| git push origin "$TAG_NAME" |