Update aboutlibraries to v15.1.1 (#7360) #2270
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: On Push | |
| on: # yamllint disable-line rule:truthy | |
| workflow_dispatch: | |
| inputs: | |
| beta: | |
| description: "true if this is a beta release" | |
| required: false | |
| default: "false" | |
| push: | |
| branches: | |
| - main | |
| env: | |
| SUPPLY_UPLOAD_MAX_RETRIES: 5 | |
| jobs: | |
| app_build: | |
| name: Github, Firebase, and Sentry Release | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'home-assistant/android' | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup-build-env | |
| with: | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0 | |
| with: | |
| ruby-version: "4.0.6" | |
| bundler-cache: false | |
| - uses: ./.github/actions/create-release-number | |
| name: Create Release Number | |
| id: rel_number | |
| - uses: ./.github/actions/inflate-secrets | |
| name: Inflate Secrets | |
| with: | |
| keystore: ${{ secrets.ORIGINAL_KEYSTORE_FILE }} | |
| google-services: ${{ secrets.GOOGLESERVICES }} | |
| firebase-creds: ${{ secrets.FIREBASECREDS }} | |
| playstore-creds: ${{ secrets.PLAYSTORECREDS }} | |
| - uses: ./.github/actions/create-release-notes | |
| name: Create Release Notes | |
| with: | |
| tag-name: ${{ steps.rel_number.outputs.version }} | |
| gh-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: ./.github/actions/download-translations | |
| name: Download Translations | |
| with: | |
| lokalise-project: ${{ secrets.LOKALISE_PROJECT }} | |
| lokalise-token: ${{ secrets.LOKALISE_TOKEN }} | |
| - name: Build Release | |
| env: | |
| KEYSTORE_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }} | |
| KEYSTORE_ALIAS: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }} | |
| KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }} | |
| VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
| run: | | |
| ./gradlew :common:assemble :app:assembleRelease :wear:assembleRelease :automotive:assembleRelease | |
| - name: Archive Build | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: release-apks | |
| path: ./**/*.apk | |
| - name: Create Version File | |
| if: github.event.inputs.beta == 'true' | |
| shell: bash | |
| env: | |
| VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} | |
| run: | | |
| echo $VERSION_CODE > ./app/build/outputs/version_code.txt | |
| - name: Create draft GitHub Pre-Release | |
| if: github.event.inputs.beta == 'true' | |
| shell: bash | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| REL_VERSION: ${{ steps.rel_number.outputs.version }} | |
| run: | | |
| set -euo pipefail | |
| assets=( | |
| ./app/build/outputs/apk/full/release/app-full-release.apk | |
| ./app/build/outputs/apk/minimal/release/app-minimal-release.apk | |
| ./app/build/outputs/version_code.txt | |
| ./wear/build/outputs/apk/release/wear-release.apk | |
| ./automotive/build/outputs/apk/full/release/automotive-full-release.apk | |
| ./automotive/build/outputs/apk/minimal/release/automotive-minimal-release.apk | |
| ./strings.zip | |
| ./app/src/main/res/xml/locales_config.xml | |
| ) | |
| # Immutable releases lock their assets at publish time, so we create the release as a | |
| # draft first and attach assets while it is still mutable. The next step publishes it. | |
| # On re-runs, --clobber keeps the upload idempotent as long as the previous attempt | |
| # did not get past the publish step. | |
| if ! gh release view "$REL_VERSION" >/dev/null 2>&1; then | |
| gh release create "$REL_VERSION" \ | |
| --draft \ | |
| --prerelease \ | |
| --notes-file ./app/build/outputs/changelogGithub | |
| fi | |
| gh release upload "$REL_VERSION" "${assets[@]}" --clobber | |
| - name: Publish Pre-Release | |
| if: github.event.inputs.beta == 'true' | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| REL_VERSION: ${{ steps.rel_number.outputs.version }} | |
| run: | | |
| gh release edit "$REL_VERSION" \ | |
| --draft=false \ | |
| --notes-file ./app/build/outputs/changelogGithub | |
| - name: Deploy to Firebase | |
| env: | |
| KEYSTORE_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }} | |
| KEYSTORE_ALIAS: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS }} | |
| KEYSTORE_ALIAS_PASSWORD: ${{ secrets.ORIGINAL_KEYSTORE_ALIAS_PASSWORD }} | |
| VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
| run: ./gradlew appDistributionUploadFullRelease | |
| - name: Install Fastlane dependencies | |
| if: github.event.inputs.beta == 'true' | |
| run: bundle install | |
| - name: Prepare Amazon Listing | |
| if: github.event.inputs.beta == 'true' | |
| run: bundle exec fastlane prep_amazon | |
| env: | |
| AMAZON_APPSTORE_CLIENT_ID: ${{ secrets.AMAZON_APPSTORE_CLIENT_ID }} | |
| AMAZON_APPSTORE_CLIENT_SECRET: ${{ secrets.AMAZON_APPSTORE_CLIENT_SECRET }} | |
| AMAZON_APPSTORE_APP_ID: ${{ secrets.AMAZON_APPSTORE_APP_ID }} | |
| - name: Upload Github Dependencies | |
| uses: gradle/actions/dependency-submission@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6.3.0 | |
| with: | |
| cache-provider: basic # Avoid the proprietary 'enhanced' cache; 'basic' uses the MIT-licensed GitHub Actions cache. | |
| - name: Print `git status` | |
| run: git status | |
| play_publish: | |
| name: Play Publish | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'home-assistant/android' | |
| concurrency: | |
| group: playstore_deploy | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup-build-env | |
| with: | |
| cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} | |
| - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0 | |
| with: | |
| ruby-version: "4.0.6" | |
| bundler-cache: false | |
| - uses: ./.github/actions/create-release-number | |
| name: Create Release Number | |
| id: rel_number | |
| - uses: ./.github/actions/inflate-secrets | |
| name: Inflate Secrets | |
| with: | |
| keystore: ${{ secrets.UPLOAD_KEYSTORE_FILE }} | |
| google-services: ${{ secrets.GOOGLESERVICES }} | |
| firebase-creds: ${{ secrets.FIREBASECREDS }} | |
| playstore-creds: ${{ secrets.PLAYSTORECREDS }} | |
| - uses: ./.github/actions/create-release-notes | |
| name: Create Release Notes | |
| with: | |
| tag-name: ${{ steps.rel_number.outputs.version }} | |
| gh-token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: ./.github/actions/download-translations | |
| name: Download Translations | |
| with: | |
| lokalise-project: ${{ secrets.LOKALISE_PROJECT }} | |
| lokalise-token: ${{ secrets.LOKALISE_TOKEN }} | |
| - name: Build Release | |
| env: | |
| KEYSTORE_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_FILE_PASSWORD }} | |
| KEYSTORE_ALIAS: ${{ secrets.UPLOAD_KEYSTORE_ALIAS }} | |
| KEYSTORE_ALIAS_PASSWORD: ${{ secrets.UPLOAD_KEYSTORE_ALIAS_PASSWORD }} | |
| VERSION_CODE: ${{ steps.rel_number.outputs.version-code }} | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
| run: | | |
| ./gradlew :common:assemble :app:bundleFullRelease :wear:bundleRelease :automotive:bundleFullRelease | |
| - name: Archive Build | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: release-aabs | |
| path: ./**/*.aab | |
| - name: Install Fastlane dependencies | |
| run: bundle install | |
| - name: Deploy to Playstore Internal | |
| run: bundle exec fastlane deploy_internal | |
| - name: Promote Internal to Beta | |
| if: github.event.inputs.beta == 'true' | |
| run: bundle exec fastlane promote_to_beta |