name: Deploy to app tests on: push: # branches: [ develop ] branches: [ '!*' ] pull_request_target: # branches: [ develop ] branches: [ '!*' ] workflow_dispatch: jobs: deploy-appcenter: name: App Center runs-on: ubuntu-latest timeout-minutes: 10 environment: app-center steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 with: java-version: 11 - uses: actions/cache@v2 with: path: | ~/.gradle/caches ~/.gradle/wrapper key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }} - name: Set run number with offset env: BUILD_NUMBER_OFFSET: ${{ secrets.BUILD_NUMBER_OFFSET }} run: echo "RUN_NUMBER=$((GITHUB_RUN_NUMBER+BUILD_NUMBER_OFFSET))" >> $GITHUB_ENV - name: Prepare build configuration run: | sed -i -e "s#applicationIdSuffix \".dev\"#applicationIdSuffix \".${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/build.gradle sed -i -e "s#.dev\"#.${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/src/debug/google-services.json sed -i -e "s#.dev\"#.${GITHUB_HEAD_REF//[-.\/]/_}\"#" app/src/debug/agconnect-services.json sed -i -e '/versionNameSuffix/d' app/build.gradle - name: Add signing config run: | cat >> app/build.gradle <> $GITHUB_ENV - name: Add signing config run: | cat >> app/build.gradle <