diff --git a/.github/workflows/android-beta.yaml b/.github/workflows/android-beta.yaml index 7a986fcc8b..b20baeaec6 100644 --- a/.github/workflows/android-beta.yaml +++ b/.github/workflows/android-beta.yaml @@ -1,15 +1,31 @@ name: Android Beta on: - workflow_dispatch: - inputs: - releasenotes: - description: 'The release notes' - required: true + push: + branches: + - master # Approved manually via `beta` environment + paths-ignore: + - .github/workflows/linux* + - .github/workflows/ios* + - '**/*_tests/**' + - CONTRIBUTORS + - LICENSE + - NOTICE + - README.md + - docs/** + - generator/** + - iphone/** + - packaging/** + - pyhelpers/** + - qt*/** + - skin_generator/** + - track_generator/** + - xcode/** jobs: - android-beta: - name: Android Beta + android-web-beta: + name: Android Web Beta runs-on: ubuntu-latest + environment: beta steps: - name: Install build tools and dependencies shell: bash @@ -55,16 +71,9 @@ jobs: ninja --version ./gradlew -x lint -x lintVitalWebBeta assembleWebBeta uploadCrashlyticsSymbolFileWebBeta - - name: Upload beta apk - uses: actions/upload-artifact@v2 - with: - name: android-web-beta - path: android/build/outputs/apk/web/beta/OrganicMaps-*-web-beta.apk - if-no-files-found: error - - name: Upload beta apk to App Distribution shell: bash working-directory: android run: | - ${{ github.event.releasenotes.name }} > RELEASE + git --no-pager show -s --format='%s%n%n%b' HEAD > RELEASE ./gradlew appDistributionUploadWebBeta diff --git a/.github/workflows/android-check.yaml b/.github/workflows/android-check.yaml index dad169d810..7ccb9f402a 100644 --- a/.github/workflows/android-check.yaml +++ b/.github/workflows/android-check.yaml @@ -54,8 +54,6 @@ jobs: shell: bash working-directory: android run: | - #export PATH="$(dirname $ANDROID_SDK_ROOT/cmake/*/bin/.|tail -n1):$PATH" # Use CMake from SDK - #echo $PATH cmake --version ninja --version ./gradlew -Parm64 assembleWebDebug diff --git a/.github/workflows/android-release.yaml b/.github/workflows/android-release.yaml new file mode 100644 index 0000000000..78285aa889 --- /dev/null +++ b/.github/workflows/android-release.yaml @@ -0,0 +1,116 @@ +name: Android Release +on: + push: + tags: + - '202*' # Approved manually via `production` environment + +jobs: + android-google-release: + name: Android Google Release + runs-on: ubuntu-latest + environment: production + steps: + - name: Install build tools and dependencies + shell: bash + run: | + sudo apt-get update -y + sudo apt-get install -y ninja-build + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Parallel submodules checkout + shell: bash + run: git submodule update --init --recursive --jobs=$(($(nproc) * 2)) + + - name: Checkout private keys + uses: actions/checkout@v2 + with: + repository: ${{ secrets.PRIVATE_REPO }} + ssh-key: ${{ secrets.PRIVATE_SSH_KEY }} + ref: master + path: private.git + + - name: Configure repo with private keys + shell: bash + run: | + ./configure.sh ./private.git + rm -rf ./private.git + + - name: Set up SDK + shell: bash + run: (cd tools/android; ./set_up_android.py --sdk $ANDROID_SDK_ROOT) + + - name: Compile + shell: bash + working-directory: android + run: | + ./gradlew bundleGoogleRelease + + - name: Upload AAB to Artifacts + uses: actions/upload-artifact@v2 + with: + name: google-release-aab + path: ./android/build/outputs/bundle/googleRelease/OrganicMaps-*-google-release.aab + if-no-files-found: error + + android-web-release: + name: Android Web Release + runs-on: ubuntu-latest + environment: production + steps: + - name: Install build tools and dependencies + shell: bash + run: | + sudo apt-get update -y + sudo apt-get install -y ninja-build + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Parallel submodules checkout + shell: bash + run: git submodule update --init --recursive --jobs=$(($(nproc) * 2)) + + - name: Checkout private keys + uses: actions/checkout@v2 + with: + repository: ${{ secrets.PRIVATE_REPO }} + ssh-key: ${{ secrets.PRIVATE_SSH_KEY }} + ref: master + path: private.git + + - name: Configure repo with private keys + shell: bash + run: | + ./configure.sh ./private.git + rm -rf ./private.git + + - name: Set up SDK + shell: bash + run: (cd tools/android; ./set_up_android.py --sdk $ANDROID_SDK_ROOT) + + - name: Compile + shell: bash + working-directory: android + run: | + ./gradlew -Pfirebase assembleWebRelease \ + uploadCrashlyticsMappingFileWebRelease \ + uploadCrashlyticsSymbolFileWebRelease + + - name: Upload APK to Artifacts + uses: actions/upload-artifact@v2 + with: + name: web-release-apk + path: ./android/build/outputs/apk/web/release/OrganicMaps-*-web-release.apk + if-no-files-found: error