diff --git a/.github/workflows/call-create-baseline.yml b/.github/workflows/call-create-baseline.yml index e7fc20f98b..0309861346 100644 --- a/.github/workflows/call-create-baseline.yml +++ b/.github/workflows/call-create-baseline.yml @@ -18,7 +18,7 @@ on: jobs: baseline_file: name: Upload baseline profile file - runs-on: [self-hosted, AndroidShell] + runs-on: [ self-hosted, AndroidShell ] outputs: BUILD_VARIANT_NAME: ${{ steps.create_uppercase_variant.outputs.BUILD_VARIANT_NAME }} BASELINE_FILE_ID: ${{ steps.create_baseline_file_id.outputs.BASELINE_FILE_ID }} @@ -71,7 +71,6 @@ jobs: gradlew_full_task="$path:$task_name $no_test_param --stacktrace" echo "BASELINE_TASK=$gradlew_full_task" >> $GITHUB_OUTPUT - # print all outputs - name: Print outputs of current baseline task run: | @@ -81,9 +80,30 @@ jobs: echo "BASELINE_FILE_PATH ${{ steps.create_baseline_file_path.outputs.BASELINE_FILE_PATH }}" echo "BASELINE_TASK ${{ steps.create_baseline_task.outputs.BASELINE_TASK }}" + - name: Setup libx11 + run: | + export DEBIAN_FRONTEND=noninteractive; + sudo apt update; + sudo apt install -y libx11-6; + + - name: Setup Platform-android-34 + run: | + $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install "platforms;android-34" + + # steps.share_android_home.ANDROID_HOME + - name: Share ANDROID_HOME location + id: share_android_home + run: | + echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_OUTPUT + + - name: Print android home + run: | + sudo echo ${{ steps.share_android_home.ANDROID_HOME }} + sudo ls ${{ steps.share_android_home.ANDROID_HOME }} + - name: Run baseline profiles run: | - ./gradlew ${{ steps.create_baseline_task.outputs.BASELINE_TASK }} + sudo ANDROID_SDK_ROOT=${{ steps.share_android_home.ANDROID_HOME }} ANDROID_HOME=${{ steps.share_android_home.ANDROID_HOME }} ANDROID_AVD_HOME=${{ steps.share_android_home.ANDROID_HOME }}/avd ./gradlew ${{ steps.create_baseline_task.outputs.BASELINE_TASK }} - uses: actions/upload-artifact@master name: "Upload baseline file" diff --git a/.github/workflows/internal.yml b/.github/workflows/internal.yml index f83e38a80b..686a20f4b2 100644 --- a/.github/workflows/internal.yml +++ b/.github/workflows/internal.yml @@ -4,306 +4,307 @@ on: push: branches: - 'dev' + - 'test' concurrency: group: "deploy" jobs: - invalidate_gradle_cache: - name: Update gradle cache - runs-on: [self-hosted, AndroidShell] - steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - with: - submodules: 'recursive' - - name: Set up JDK 1.17 - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4 - with: - distribution: 'temurin' - java-version: '17' - - name: Build internal - uses: gradle/gradle-build-action@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff # v3 - with: - cache-read-only: false - arguments: testDebugUnitTest desktopTest detekt lint - build_number: - name: Generate build number - runs-on: [self-hosted, AndroidShell] - outputs: - number: ${{ steps.build_out.outputs.number }} - number_wearos: ${{ steps.wearos_out.outputs.number_wearos }} - steps: - - name: Generate build number - id: buildnumber - uses: onyxmueller/build-tag-number@4a0c81c9af350d967032d49204c83c38e6b0c8e4 # v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: Generate build number for WearOS - id: buildnumber_wearos - uses: onyxmueller/build-tag-number@4a0c81c9af350d967032d49204c83c38e6b0c8e4 # v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - name: 'Set output for simple build' - id: build_out - run: | - echo "number=${{ steps.buildnumber.outputs.build_number }}" >> $GITHUB_OUTPUT - - name: 'Set output for WearOS' - id: wearos_out - run: | - echo "number_wearos=${{ steps.buildnumber_wearos.outputs.build_number }}" >> $GITHUB_OUTPUT + #invalidate_gradle_cache: + # name: Update gradle cache + # runs-on: [self-hosted, AndroidShell] + # steps: + # - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + # with: + # submodules: 'recursive' + # - name: Set up JDK 1.17 + # uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4 + # with: + # distribution: 'temurin' + # java-version: '17' + # - name: Build internal + # uses: gradle/gradle-build-action@4c39dd82cd5e1ec7c6fa0173bb41b4b6bb3b86ff # v3 + # with: + # cache-read-only: false + # arguments: testDebugUnitTest desktopTest detekt lint + #build_number: + # name: Generate build number + # runs-on: [self-hosted, AndroidShell] + # outputs: + # number: ${{ steps.build_out.outputs.number }} + # number_wearos: ${{ steps.wearos_out.outputs.number_wearos }} + # steps: + # - name: Generate build number + # id: buildnumber + # uses: onyxmueller/build-tag-number@4a0c81c9af350d967032d49204c83c38e6b0c8e4 # v1 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # - name: Generate build number for WearOS + # id: buildnumber_wearos + # uses: onyxmueller/build-tag-number@4a0c81c9af350d967032d49204c83c38e6b0c8e4 # v1 + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # - name: 'Set output for simple build' + # id: build_out + # run: | + # echo "number=${{ steps.buildnumber.outputs.build_number }}" >> $GITHUB_OUTPUT + # - name: 'Set output for WearOS' + # id: wearos_out + # run: | + # echo "number_wearos=${{ steps.buildnumber_wearos.outputs.build_number }}" >> $GITHUB_OUTPUT create_internal_baseline: name: "Create baseline profile" - needs: build_number + #needs: build_number uses: ./.github/workflows/call-create-baseline.yml with: BUILD_VARIANT_NAME: "internal" - build_internal_release: - name: Build Internal AAB and APK - runs-on: [self-hosted, AndroidShell] - needs: [ create_internal_baseline, build_number ] - strategy: - matrix: - target: [ "gh_gms", "gh_nogms", "googleplay" ] - steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - with: - submodules: 'recursive' - - uses: actions/download-artifact@master - name: "Download ${{ needs.create_internal_baseline.outputs.BUILD_VARIANT_NAME }} baseline file" - with: - name: ${{ needs.create_internal_baseline.outputs.BASELINE_FILE_ID }} - path: ${{ needs.create_internal_baseline.outputs.BASELINE_FILE_PATH }} - - name: Set up JDK 1.17 - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4 - with: - distribution: 'temurin' - java-version: '17' - - name: 'Set variables' - id: vars - run: | - export $(cat .github/workflows/version.env | xargs) - echo "major_version=${MAJOR_VERSION}" >> $GITHUB_OUTPUT - echo "minor_version=${{ needs.build_number.outputs.number }}" >> $GITHUB_OUTPUT - - name: Build internal release - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - ORG_GRADLE_PROJECT_version_code: ${{ steps.vars.outputs.minor_version }} - ORG_GRADLE_PROJECT_version_name: "${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}" - ORG_GRADLE_PROJECT_countly_url: ${{ secrets.COUNTLY_URL_PROD }} - ORG_GRADLE_PROJECT_countly_app_key: ${{ secrets.COUNTLY_APP_KEY_PROD }} - run: | - export $(cat .github/workflows/targets/${{ matrix.target }}.env | xargs) - ./gradlew :instances:android:app:assembleInternal :instances:android:app:bundleInternal - - name: Sign AAB - id: sign_aab - uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1 - with: - releaseDirectory: instances/android/app/build/outputs/bundle/internal - signingKeyBase64: ${{ secrets.SIGNING_KEY }} - alias: ${{ secrets.KEY_ALIAS }} - keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} - keyPassword: ${{ secrets.KEY_ALIAS_PASSWORD }} - env: - BUILD_TOOLS_VERSION: "34.0.0" - - name: Sign APK - id: sign_apk - uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1 - with: - releaseDirectory: instances/android/app/build/outputs/apk/internal - signingKeyBase64: ${{ secrets.SIGNING_KEY }} - alias: ${{ secrets.KEY_ALIAS }} - keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} - keyPassword: ${{ secrets.KEY_ALIAS_PASSWORD }} - env: - BUILD_TOOLS_VERSION: "34.0.0" - - name: Copy artifacts - id: artifacts_copy - run: | - mkdir artifacts - cp ${{ steps.sign_aab.outputs.signedReleaseFile }} artifacts/flipper-zero-${{ matrix.target }}.aab - cp ${{ steps.sign_apk.outputs.signedReleaseFile }} artifacts/flipper-zero-${{ matrix.target }}.apk - cp instances/android/app/build/outputs/mapping/internal/mapping.txt artifacts/mapping-${{ matrix.target }}.txt - echo "path=artifacts/" >> $GITHUB_OUTPUT - - name: Upload Artifacts - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 - with: - name: artifacts-${{ matrix.target }} - path: ${{ steps.artifacts_copy.outputs.path }} - build_internal_release_gms_wearos: - name: Build Internal AAB and APK WearOS - runs-on: [self-hosted, AndroidShell] - needs: build_number - steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - with: - submodules: 'recursive' - - name: Set up JDK 1.17 - uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4 - with: - distribution: 'temurin' - java-version: '17' - - name: 'Set variables' - id: vars - run: | - export $(cat .github/workflows/version.env | xargs) - echo "major_version=${MAJOR_VERSION}" >> $GITHUB_OUTPUT - echo "minor_version=${{ needs.build_number.outputs.number_wearos }}" >> $GITHUB_OUTPUT - - name: Build internal release - env: - SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - ORG_GRADLE_PROJECT_version_code: ${{ steps.vars.outputs.minor_version }} - ORG_GRADLE_PROJECT_version_name: "${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}" - run: | - export $(cat .github/workflows/targets/wearos.env | xargs) - ./gradlew :instances:wearable:assembleInternal :instances:wearable:bundleInternal - - name: Sign Wear AAB - id: sign_wear_aab - uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1 - with: - releaseDirectory: instances/wearable/build/outputs/bundle/internal - signingKeyBase64: ${{ secrets.SIGNING_KEY }} - alias: ${{ secrets.KEY_ALIAS }} - keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} - keyPassword: ${{ secrets.KEY_ALIAS_PASSWORD }} - env: - BUILD_TOOLS_VERSION: "34.0.0" - - name: Sign Wear APK - id: sign_wear_apk - uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1 - with: - releaseDirectory: instances/wearable/build/outputs/apk/internal - signingKeyBase64: ${{ secrets.SIGNING_KEY }} - alias: ${{ secrets.KEY_ALIAS }} - keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} - keyPassword: ${{ secrets.KEY_ALIAS_PASSWORD }} - env: - BUILD_TOOLS_VERSION: "34.0.0" - - name: Copy artifacts - id: artifacts_copy - run: | - mkdir artifacts - cp ${{ steps.sign_wear_aab.outputs.signedReleaseFile }} artifacts/flipper-zero-wearos.aab - cp ${{ steps.sign_wear_apk.outputs.signedReleaseFile }} artifacts/flipper-zero-wearos.apk - cp instances/wearable/build/outputs/mapping/internal/mapping.txt artifacts/mapping-wearos.txt - echo "path=artifacts/" >> $GITHUB_OUTPUT - - name: Upload Artifacts - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 - with: - name: artifacts-wearos - path: ${{ steps.artifacts_copy.outputs.path }} - upload_to_github: - name: Upload to Github Releases - runs-on: [self-hosted, AndroidShell] - needs: [ build_internal_release, build_internal_release_gms_wearos, build_number ] - steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - with: - submodules: 'recursive' - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 - id: download-gh_gms - with: - name: artifacts-gh_gms - path: download/gh_gms - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 - id: download-gh_nogms - with: - name: artifacts-gh_nogms - path: download/gh_nogms - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 - id: download-googleplay - with: - name: artifacts-googleplay - path: download/googleplay - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 - id: download-wearos - with: - name: artifacts-wearos - path: download/wearos - - name: 'Set variables' - id: vars - run: | - export $(cat .github/workflows/version.env | xargs) - echo "major_version=${MAJOR_VERSION}" >> $GITHUB_OUTPUT - echo "minor_version=${{ needs.build_number.outputs.number }}" >> $GITHUB_OUTPUT - - name: 'Copy artifacts' - id: artifacts_copy - run: | - mkdir artifacts - cp ${{steps.download-gh_gms.outputs.download-path}}/* artifacts/ - cp ${{steps.download-gh_nogms.outputs.download-path}}/* artifacts/ - cp ${{steps.download-googleplay.outputs.download-path}}/* artifacts/ - cp ${{steps.download-wearos.outputs.download-path}}/* artifacts/ - echo "path=artifacts/" >> $GITHUB_OUTPUT - - name: Install zip - uses: montudor/action-zip@a8e75c9faefcd80fac3baf53ef40b9b119d5b702 # v1 - - name: Prepare mapping - id: mappings - run: | - mkdir mappings - for target in "gh_gms" "gh_nogms" "googleplay" "wearos"; do \ - mv "${{ steps.artifacts_copy.outputs.path }}/mapping-${target}.txt" mappings/ ; done - zip -qq -r mappings.zip mappings - echo "archive=mappings.zip" >> $GITHUB_OUTPUT - - name: Prepare other builds - id: other - run: | - mkdir other - mv "${{ steps.artifacts_copy.outputs.path }}/flipper-zero-googleplay.apk" other/ - mv "${{ steps.artifacts_copy.outputs.path }}/flipper-zero-wearos.apk" other/ - mv ${{ steps.artifacts_copy.outputs.path }}/*.aab other/ - zip -qq -r other.zip other - echo "archive=other.zip" >> $GITHUB_OUTPUT - - name: Artefact build beautifier - id: beautifier - run: | - mv ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-gh_gms.apk ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-gms-${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}.apk - mv ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-gh_nogms.apk ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-nogms-${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}.apk - - name: Create internal Release - id: create_internal_release - uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - files: | - ${{ steps.mappings.outputs.archive }} - ${{ steps.other.outputs.archive }} - ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-gms-${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}.apk - ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-nogms-${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}.apk - tag_name: ${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }} - name: Flipper App ${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }} - draft: false - prerelease: true - upload_to_playstore: - name: Upload to Play Store - runs-on: [self-hosted, AndroidShell] - needs: [ build_internal_release ] - steps: - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 - id: download-googleplay - with: - name: artifacts-googleplay - - name: Upload to Play Store - uses: r0adkll/upload-google-play@935ef9c68bb393a8e6116b1575626a7f5be3a7fb # v1.1.3 - with: - serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_PUBLISHER_JSON }} - packageName: com.flipperdevices.app - releaseFiles: ${{steps.download-googleplay.outputs.download-path}}/flipper-zero-googleplay.aab - track: beta - mappingFile: ${{steps.download-googleplay.outputs.download-path}}/mapping-googleplay.txt - upload_to_playstore_wearos: - name: Upload Wear OS to Play Store - runs-on: [self-hosted, AndroidShell] - needs: [ build_internal_release_gms_wearos ] - steps: - - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 - id: download-wearos - with: - name: artifacts-wearos - - name: Upload to Play Store Wear OS - uses: r0adkll/upload-google-play@935ef9c68bb393a8e6116b1575626a7f5be3a7fb # v1.1.3 - with: - serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_PUBLISHER_JSON }} - packageName: com.flipperdevices.app - releaseFiles: ${{steps.download-wearos.outputs.download-path}}/flipper-zero-wearos.aab - track: wear:beta - mappingFile: ${{steps.download-wearos.outputs.download-path}}/mapping-wearos.txt +# build_internal_release: +# name: Build Internal AAB and APK +# runs-on: [self-hosted, AndroidShell] +# needs: [ create_internal_baseline, build_number ] +# strategy: +# matrix: +# target: [ "gh_gms", "gh_nogms", "googleplay" ] +# steps: +# - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 +# with: +# submodules: 'recursive' +# - uses: actions/download-artifact@master +# name: "Download ${{ needs.create_internal_baseline.outputs.BUILD_VARIANT_NAME }} baseline file" +# with: +# name: ${{ needs.create_internal_baseline.outputs.BASELINE_FILE_ID }} +# path: ${{ needs.create_internal_baseline.outputs.BASELINE_FILE_PATH }} +# - name: Set up JDK 1.17 +# uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4 +# with: +# distribution: 'temurin' +# java-version: '17' +# - name: 'Set variables' +# id: vars +# run: | +# export $(cat .github/workflows/version.env | xargs) +# echo "major_version=${MAJOR_VERSION}" >> $GITHUB_OUTPUT +# echo "minor_version=${{ needs.build_number.outputs.number }}" >> $GITHUB_OUTPUT +# - name: Build internal release +# env: +# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} +# ORG_GRADLE_PROJECT_version_code: ${{ steps.vars.outputs.minor_version }} +# ORG_GRADLE_PROJECT_version_name: "${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}" +# ORG_GRADLE_PROJECT_countly_url: ${{ secrets.COUNTLY_URL_PROD }} +# ORG_GRADLE_PROJECT_countly_app_key: ${{ secrets.COUNTLY_APP_KEY_PROD }} +# run: | +# export $(cat .github/workflows/targets/${{ matrix.target }}.env | xargs) +# ./gradlew :instances:android:app:assembleInternal :instances:android:app:bundleInternal +# - name: Sign AAB +# id: sign_aab +# uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1 +# with: +# releaseDirectory: instances/android/app/build/outputs/bundle/internal +# signingKeyBase64: ${{ secrets.SIGNING_KEY }} +# alias: ${{ secrets.KEY_ALIAS }} +# keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} +# keyPassword: ${{ secrets.KEY_ALIAS_PASSWORD }} +# env: +# BUILD_TOOLS_VERSION: "34.0.0" +# - name: Sign APK +# id: sign_apk +# uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1 +# with: +# releaseDirectory: instances/android/app/build/outputs/apk/internal +# signingKeyBase64: ${{ secrets.SIGNING_KEY }} +# alias: ${{ secrets.KEY_ALIAS }} +# keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} +# keyPassword: ${{ secrets.KEY_ALIAS_PASSWORD }} +# env: +# BUILD_TOOLS_VERSION: "34.0.0" +# - name: Copy artifacts +# id: artifacts_copy +# run: | +# mkdir artifacts +# cp ${{ steps.sign_aab.outputs.signedReleaseFile }} artifacts/flipper-zero-${{ matrix.target }}.aab +# cp ${{ steps.sign_apk.outputs.signedReleaseFile }} artifacts/flipper-zero-${{ matrix.target }}.apk +# cp instances/android/app/build/outputs/mapping/internal/mapping.txt artifacts/mapping-${{ matrix.target }}.txt +# echo "path=artifacts/" >> $GITHUB_OUTPUT +# - name: Upload Artifacts +# uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 +# with: +# name: artifacts-${{ matrix.target }} +# path: ${{ steps.artifacts_copy.outputs.path }} +# build_internal_release_gms_wearos: +# name: Build Internal AAB and APK WearOS +# runs-on: [self-hosted, AndroidShell] +# needs: build_number +# steps: +# - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 +# with: +# submodules: 'recursive' +# - name: Set up JDK 1.17 +# uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4 +# with: +# distribution: 'temurin' +# java-version: '17' +# - name: 'Set variables' +# id: vars +# run: | +# export $(cat .github/workflows/version.env | xargs) +# echo "major_version=${MAJOR_VERSION}" >> $GITHUB_OUTPUT +# echo "minor_version=${{ needs.build_number.outputs.number_wearos }}" >> $GITHUB_OUTPUT +# - name: Build internal release +# env: +# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} +# ORG_GRADLE_PROJECT_version_code: ${{ steps.vars.outputs.minor_version }} +# ORG_GRADLE_PROJECT_version_name: "${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}" +# run: | +# export $(cat .github/workflows/targets/wearos.env | xargs) +# ./gradlew :instances:wearable:assembleInternal :instances:wearable:bundleInternal +# - name: Sign Wear AAB +# id: sign_wear_aab +# uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1 +# with: +# releaseDirectory: instances/wearable/build/outputs/bundle/internal +# signingKeyBase64: ${{ secrets.SIGNING_KEY }} +# alias: ${{ secrets.KEY_ALIAS }} +# keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} +# keyPassword: ${{ secrets.KEY_ALIAS_PASSWORD }} +# env: +# BUILD_TOOLS_VERSION: "34.0.0" +# - name: Sign Wear APK +# id: sign_wear_apk +# uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1 +# with: +# releaseDirectory: instances/wearable/build/outputs/apk/internal +# signingKeyBase64: ${{ secrets.SIGNING_KEY }} +# alias: ${{ secrets.KEY_ALIAS }} +# keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} +# keyPassword: ${{ secrets.KEY_ALIAS_PASSWORD }} +# env: +# BUILD_TOOLS_VERSION: "34.0.0" +# - name: Copy artifacts +# id: artifacts_copy +# run: | +# mkdir artifacts +# cp ${{ steps.sign_wear_aab.outputs.signedReleaseFile }} artifacts/flipper-zero-wearos.aab +# cp ${{ steps.sign_wear_apk.outputs.signedReleaseFile }} artifacts/flipper-zero-wearos.apk +# cp instances/wearable/build/outputs/mapping/internal/mapping.txt artifacts/mapping-wearos.txt +# echo "path=artifacts/" >> $GITHUB_OUTPUT +# - name: Upload Artifacts +# uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4 +# with: +# name: artifacts-wearos +# path: ${{ steps.artifacts_copy.outputs.path }} +# upload_to_github: +# name: Upload to Github Releases +# runs-on: [self-hosted, AndroidShell] +# needs: [ build_internal_release, build_internal_release_gms_wearos, build_number ] +# steps: +# - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 +# with: +# submodules: 'recursive' +# - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 +# id: download-gh_gms +# with: +# name: artifacts-gh_gms +# path: download/gh_gms +# - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 +# id: download-gh_nogms +# with: +# name: artifacts-gh_nogms +# path: download/gh_nogms +# - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 +# id: download-googleplay +# with: +# name: artifacts-googleplay +# path: download/googleplay +# - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 +# id: download-wearos +# with: +# name: artifacts-wearos +# path: download/wearos +# - name: 'Set variables' +# id: vars +# run: | +# export $(cat .github/workflows/version.env | xargs) +# echo "major_version=${MAJOR_VERSION}" >> $GITHUB_OUTPUT +# echo "minor_version=${{ needs.build_number.outputs.number }}" >> $GITHUB_OUTPUT +# - name: 'Copy artifacts' +# id: artifacts_copy +# run: | +# mkdir artifacts +# cp ${{steps.download-gh_gms.outputs.download-path}}/* artifacts/ +# cp ${{steps.download-gh_nogms.outputs.download-path}}/* artifacts/ +# cp ${{steps.download-googleplay.outputs.download-path}}/* artifacts/ +# cp ${{steps.download-wearos.outputs.download-path}}/* artifacts/ +# echo "path=artifacts/" >> $GITHUB_OUTPUT +# - name: Install zip +# uses: montudor/action-zip@a8e75c9faefcd80fac3baf53ef40b9b119d5b702 # v1 +# - name: Prepare mapping +# id: mappings +# run: | +# mkdir mappings +# for target in "gh_gms" "gh_nogms" "googleplay" "wearos"; do \ +# mv "${{ steps.artifacts_copy.outputs.path }}/mapping-${target}.txt" mappings/ ; done +# zip -qq -r mappings.zip mappings +# echo "archive=mappings.zip" >> $GITHUB_OUTPUT +# - name: Prepare other builds +# id: other +# run: | +# mkdir other +# mv "${{ steps.artifacts_copy.outputs.path }}/flipper-zero-googleplay.apk" other/ +# mv "${{ steps.artifacts_copy.outputs.path }}/flipper-zero-wearos.apk" other/ +# mv ${{ steps.artifacts_copy.outputs.path }}/*.aab other/ +# zip -qq -r other.zip other +# echo "archive=other.zip" >> $GITHUB_OUTPUT +# - name: Artefact build beautifier +# id: beautifier +# run: | +# mv ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-gh_gms.apk ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-gms-${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}.apk +# mv ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-gh_nogms.apk ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-nogms-${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}.apk +# - name: Create internal Release +# id: create_internal_release +# uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# with: +# files: | +# ${{ steps.mappings.outputs.archive }} +# ${{ steps.other.outputs.archive }} +# ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-gms-${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}.apk +# ${{ steps.artifacts_copy.outputs.path }}/flipper-zero-nogms-${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }}.apk +# tag_name: ${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }} +# name: Flipper App ${{ steps.vars.outputs.major_version }}.${{ steps.vars.outputs.minor_version }} +# draft: false +# prerelease: true +# upload_to_playstore: +# name: Upload to Play Store +# runs-on: [self-hosted, AndroidShell] +# needs: [ build_internal_release ] +# steps: +# - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 +# id: download-googleplay +# with: +# name: artifacts-googleplay +# - name: Upload to Play Store +# uses: r0adkll/upload-google-play@935ef9c68bb393a8e6116b1575626a7f5be3a7fb # v1.1.3 +# with: +# serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_PUBLISHER_JSON }} +# packageName: com.flipperdevices.app +# releaseFiles: ${{steps.download-googleplay.outputs.download-path}}/flipper-zero-googleplay.aab +# track: beta +# mappingFile: ${{steps.download-googleplay.outputs.download-path}}/mapping-googleplay.txt +# upload_to_playstore_wearos: +# name: Upload Wear OS to Play Store +# runs-on: [self-hosted, AndroidShell] +# needs: [ build_internal_release_gms_wearos ] +# steps: +# - uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4 +# id: download-wearos +# with: +# name: artifacts-wearos +# - name: Upload to Play Store Wear OS +# uses: r0adkll/upload-google-play@935ef9c68bb393a8e6116b1575626a7f5be3a7fb # v1.1.3 +# with: +# serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_PUBLISHER_JSON }} +# packageName: com.flipperdevices.app +# releaseFiles: ${{steps.download-wearos.outputs.download-path}}/flipper-zero-wearos.aab +# track: wear:beta +# mappingFile: ${{steps.download-wearos.outputs.download-path}}/mapping-wearos.txt