Skip to content

Build(deps): Bump com.google.firebase.crashlytics from 3.0.5 to 3.0.6 #300

Build(deps): Bump com.google.firebase.crashlytics from 3.0.5 to 3.0.6

Build(deps): Bump com.google.firebase.crashlytics from 3.0.5 to 3.0.6 #300

Workflow file for this run

name: MT build (git submodule)
on:
workflow_dispatch: # manual
pull_request:
push:
branches:
# - '**' # ALL
- 'master'
# TODO 'develop', 'main'?
# gh workflow run mt-build-module.yml --ref <branch>
# gh run list --workflow=mt-build-module.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.head_ref }}
cancel-in-progress: true
jobs:
MT-BUILD-JOB:
name: "MT Build (git submodule)"
runs-on: ubuntu-latest
steps:
- name: MT select main repo checkout branch
id: mt-pick-main-repo-checkout-branch
env:
GH_TOKEN: ${{ github.token }} # GitHub CLI in a GitHub Actions workflow
run: |
MAIN_REPO_URL="https://github.com/mtransitapps/mtransit-for-android.git"
MT_BRANCH_NAME=${{ github.head_ref || github.ref_name }}
MT_TARGET_BRANCH_NAME=${{ github.base_ref || github.ref_name }}
BRANCH_EXISTS=$(git ls-remote --heads $MAIN_REPO_URL $MT_BRANCH_NAME | wc -l);
if [ $BRANCH_EXISTS -eq 1 ]; then
CHECKOUT_BRANCH=$MT_BRANCH_NAME
else
# Pull request target branch with same name?
BRANCH_EXISTS=$(git ls-remote --heads $MAIN_REPO_URL $MT_TARGET_BRANCH_NAME | wc -l);
if [ $BRANCH_EXISTS -eq 1 ]; then
CHECKOUT_BRANCH=$MT_TARGET_BRANCH_NAME
else
echo "WARNING: no match for current or target branch!!!"
DEFAULT_REPO_BRANCH=$(gh api repos/mtransitapps/mtransit-for-android --jq '.default_branch');
CHECKOUT_BRANCH=$DEFAULT_REPO_BRANCH
fi
fi
echo "Checkout branch: '$CHECKOUT_BRANCH'."
echo "mt_checkout_branch=$CHECKOUT_BRANCH" >> "$GITHUB_OUTPUT"
- name: MT check out main repo
uses: actions/checkout@v4
with:
repository: mtransitapps/mtransit-for-android
ref: ${{ steps.mt-pick-main-repo-checkout-branch.outputs.mt_checkout_branch }}
submodules: true # required to set right token
fetch-depth: 0 # fetch all (not required util release build)
- name: MT check out submodules
run: ./checkout_submodules.sh
- name: MT check out this module repo build SHA
run: |
REPOSITORY_OWNER_AND_NAME=${{ github.repository }};
REPOSITORY_NAME=$(basename $REPOSITORY_OWNER_AND_NAME);
SHA=${{ github.event.pull_request.head.sha || github.sha }};
echo "Checking our this repo '$REPOSITORY_NAME' workflow sha '$SHA':"
git -C $REPOSITORY_NAME checkout $SHA;
- name: MT setup MT_GIT_BRANCH env
if: github.event_name != 'pull_request'
run: |
echo "MT_GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: MT code setup
run: ./commons/code_setup.sh
- name: MT set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: MT test
run: ./test.sh
- name: MT artifact > unit tests XML results
uses: actions/upload-artifact@v4
if: ${{ always() }} # even if tests fails
with:
name: unit-test-xml-results
path: |
*/build/test-results/**/*.xml
*/build/test-results/*.xml
*/build/reports/*.xml
- name: MT artifact > HTML reports
uses: actions/upload-artifact@v4
if: ${{ always() }} # even if tests fails
with:
name: html-reports
path: |
*/build/reports/
!**/*.xml
- name: MT assemble release (APK & ABB)
if: github.event_name != 'pull_request'
run: ./assemble_release.sh
env:
MT_ENCRYPT_KEY: ${{ secrets.MT_ENCRYPT_KEY }}
- name: MT artifact > app-android > APK & ABB
uses: actions/upload-artifact@v4
with:
name: app-android-apk-bundle
path: |
app-android/build/outputs/apk
app-android/build/outputs/bundle