From e6b30997bc5e3aa2e378de24b4bba80f962e4456 Mon Sep 17 00:00:00 2001 From: Florian Buenzli Date: Wed, 22 Apr 2026 14:05:54 +0200 Subject: [PATCH 1/8] separate android setup into composite actions --- .github/actions/android-app-setup/action.yml | 67 ++++++++++++++ .github/actions/android-base-setup/action.yml | 46 ++++++++++ .../workflows/android_build_alpaka_upload.yml | 67 ++++---------- .../workflows/android_build_store_upload.yml | 56 ++++-------- .github/workflows/android_code_quality.yml | 89 ++++++++----------- .github/workflows/android_gradle_task.yml | 12 ++- .../workflows/android_library_artifactory.yml | 24 +++-- 7 files changed, 203 insertions(+), 158 deletions(-) create mode 100644 .github/actions/android-app-setup/action.yml create mode 100644 .github/actions/android-base-setup/action.yml diff --git a/.github/actions/android-app-setup/action.yml b/.github/actions/android-app-setup/action.yml new file mode 100644 index 0000000..7e5c812 --- /dev/null +++ b/.github/actions/android-app-setup/action.yml @@ -0,0 +1,67 @@ +name: Setup Android App Build +description: > + Extended setup for Android app build jobs (Alpaka, Play Store, code quality). + Calls android-base-setup and then computes build variables derived from the + flavor and app module inputs. + All inputs must be supplied by the caller — defaults live in the workflow files. + +inputs: + checkout-token: + description: 'Token used for checkout. Falls back to the default GITHUB_TOKEN if not set.' + default: ${{ github.token }} + use-git-lfs: + description: 'Use git lfs during repository checkout.' + fetch-depth: + description: 'Number of commits to fetch during checkout.' + jdk: + description: 'The JDK version to use.' + setup-rust: + description: 'Whether to set up the Rust toolchain.' + flavor: + description: 'The build flavor. Used to compute flavor_capitalized.' + app-module: + description: 'The Gradle app module (e.g. "app" or "android:androidApp").' + +outputs: + flavor_capitalized: + description: 'The flavor name with the first letter capitalized.' + value: ${{ steps.vars.outputs.flavor_capitalized }} + app_module_path: + description: 'The app module path with colons replaced by slashes.' + value: ${{ steps.vars.outputs.app_module_path }} + build_id: + description: 'A random UUID for this build.' + value: ${{ steps.vars.outputs.build_id }} + build_number: + description: 'The GitHub run number.' + value: ${{ steps.vars.outputs.build_number }} + build_batch: + description: 'The GitHub run ID.' + value: ${{ steps.vars.outputs.build_batch }} + +runs: + using: composite + steps: + - name: Setup Android environment + uses: ./.github/actions/android-base-setup + with: + checkout-token: ${{ inputs.checkout-token }} + use-git-lfs: ${{ inputs.use-git-lfs }} + fetch-depth: ${{ inputs.fetch-depth }} + jdk: ${{ inputs.jdk }} + setup-rust: ${{ inputs.setup-rust }} + + - name: Set Build Variables + id: vars + shell: bash + run: | + flavor=${{ inputs.flavor }} + echo "flavor_capitalized=${flavor~}" >> "$GITHUB_OUTPUT" + + appModulePath=${{ inputs.app-module }} + appModulePath=${appModulePath//:/\/} + echo "app_module_path=$appModulePath" >> "$GITHUB_OUTPUT" + + echo "build_id=$(cat /proc/sys/kernel/random/uuid)" >> "$GITHUB_OUTPUT" + echo "build_number=${{ github.run_number }}" >> "$GITHUB_OUTPUT" + echo "build_batch=${{ github.run_id }}" >> "$GITHUB_OUTPUT" diff --git a/.github/actions/android-base-setup/action.yml b/.github/actions/android-base-setup/action.yml new file mode 100644 index 0000000..d4b082f --- /dev/null +++ b/.github/actions/android-base-setup/action.yml @@ -0,0 +1,46 @@ +name: Setup Android Environment +description: > + Base setup for Android CI jobs. Checks out the repository, installs zstd, + optionally sets up a JDK, and optionally sets up the Rust toolchain. + All inputs must be supplied by the caller — defaults live in the workflow files. + +inputs: + checkout-token: + description: 'Token used for checkout. Falls back to the default GITHUB_TOKEN if not set.' + default: ${{ github.token }} + use-git-lfs: + description: 'Use git lfs during repository checkout.' + fetch-depth: + description: 'Number of commits to fetch during checkout.' + setup-jdk: + description: 'Whether to set up a JDK.' + jdk: + description: 'The JDK version to use.' + setup-rust: + description: 'Whether to set up the Rust toolchain.' + +runs: + using: composite + steps: + - name: Checkout + uses: actions/checkout@v6.0.2 + with: + token: ${{ inputs.checkout-token }} + submodules: 'recursive' + lfs: ${{ inputs.use-git-lfs }} + fetch-depth: ${{ inputs.fetch-depth }} + + - name: Set up JDK + if: ${{ inputs.setup-jdk != 'false' }} + uses: actions/setup-java@v5.2.0 + with: + distribution: 'zulu' + java-version: ${{ inputs.jdk }} + + - name: Install zstd + shell: bash + run: sudo apt-get install -y zstd + + - name: Setup Rust toolchain + if: ${{ inputs.setup-rust == 'true' }} + uses: actions-rust-lang/setup-rust-toolchain@v1.15.4 diff --git a/.github/workflows/android_build_alpaka_upload.yml b/.github/workflows/android_build_alpaka_upload.yml index c989e1a..ec964aa 100644 --- a/.github/workflows/android_build_alpaka_upload.yml +++ b/.github/workflows/android_build_alpaka_upload.yml @@ -103,14 +103,16 @@ jobs: group: ${{ inputs.concurrency-group }} cancel-in-progress: true steps: - # Checkout repository and submodules - - name: Checkout - uses: actions/checkout@v6.0.2 + - name: Setup Android app build environment + id: setup + uses: ./.github/actions/android-app-setup with: - token: ${{ secrets.ANDROID_JENKINS_PAT }} - submodules: 'recursive' - lfs: ${{ inputs.use-git-lfs }} - fetch-depth: 10 + checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} + use-git-lfs: ${{ inputs.use-git-lfs }} + jdk: ${{ inputs.jdk }} + setup-rust: ${{ inputs.setup-rust-tool-chain }} + flavor: ${{ inputs.flavor }} + app-module: ${{ inputs.app-module }} - name: Ensure ~/.ssh is a directory env: @@ -138,38 +140,21 @@ jobs: env: SSH_KEY: ${{ secrets.SSH_KEY }} if: ${{ env.SSH_KEY != '' }} + shell: bash run: | cat >> ~/.ssh/known_hosts <> "$GITHUB_OUTPUT" - - buildBatch=${{ github.run_id }} - echo "build_batch=$buildBatch" >> "$GITHUB_OUTPUT" - - buildId=$(cat /proc/sys/kernel/random/uuid) - echo "build_id=$buildId" >> "$GITHUB_OUTPUT" - - buildNumber=${{ github.run_number }} - echo "build_number=$buildNumber" >> "$GITHUB_OUTPUT" - - name: write build_id to file - run: echo "${{ steps.vars.outputs.build_id }}" > build_id.txt + run: echo "${{ steps.setup.outputs.build_id }}" > build_id.txt - name: upload build_id as artifact uses: actions/upload-artifact@v7.0.1 @@ -178,36 +163,22 @@ jobs: compression-level: 0 path: ${{ inputs.working-directory }}/build_id.txt - # Setup JDK environment - - name: Set up JDK - uses: actions/setup-java@v5.2.0 - with: - distribution: 'zulu' - java-version: ${{ inputs.jdk }} - - - name: Install zstd - run: sudo apt-get install -y zstd - - # Setup rust Tool Chain - - name: Setup rust Tool Chain - uses: actions-rust-lang/setup-rust-toolchain@v1.15.4 - if: ${{ inputs.setup-rust-tool-chain }} - # Build and upload app to Alpaka - name: Build app + shell: bash run: | if [ -n "${{ inputs.working-directory-suffix }}" ]; then cd "${{ inputs.working-directory-suffix }}" fi - ./gradlew :${{ inputs.app-module }}:clean :${{ inputs.app-module }}:assembleAndPublishToAlpaka${{ steps.vars.outputs.flavor_capitalized }}Release \ + ./gradlew :${{ inputs.app-module }}:clean :${{ inputs.app-module }}:assembleAndPublishToAlpaka${{ steps.setup.outputs.flavor_capitalized }}Release \ ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} \ -PubiqueMavenUrl=${{ secrets.UB_ARTIFACTORY_URL_ANDROID }} \ -PubiqueMavenUser=${{ secrets.UB_ARTIFACTORY_USER }} \ -PubiqueMavenPass=${{ secrets.UB_ARTIFACTORY_PASSWORD }} \ -PubiquePoEditorAPIKey=${{ secrets.UBIQUE_POEDITOR_API_KEY }} \ - -Pbuild_batch=${{ steps.vars.outputs.build_batch }} \ - -Pbuild_id=${{ steps.vars.outputs.build_id }} \ - -Pbuild_number=${{ steps.vars.outputs.build_number }} \ + -Pbuild_batch=${{ steps.setup.outputs.build_batch }} \ + -Pbuild_id=${{ steps.setup.outputs.build_id }} \ + -Pbuild_number=${{ steps.setup.outputs.build_number }} \ -Pbranch=${{ inputs.git-branch }} \ -PcommitHash=${{ inputs.git-sha }} \ ${{ secrets.ADDITIONAL_GRADLE_PROPS }} @@ -222,6 +193,6 @@ jobs: echo '### Alpaka Build Info' >> $GITHUB_STEP_SUMMARY echo '| | |' >> $GITHUB_STEP_SUMMARY echo '|---|---|' >> $GITHUB_STEP_SUMMARY - echo '| Build Batch | ${{ steps.vars.outputs.build_batch }} |' >> $GITHUB_STEP_SUMMARY - echo '| Build ID | ${{ steps.vars.outputs.build_id }} |' >> $GITHUB_STEP_SUMMARY - echo '| Build Number | ${{ steps.vars.outputs.build_number }} |' >> $GITHUB_STEP_SUMMARY + echo '| Build Batch | ${{ steps.setup.outputs.build_batch }} |' >> $GITHUB_STEP_SUMMARY + echo '| Build ID | ${{ steps.setup.outputs.build_id }} |' >> $GITHUB_STEP_SUMMARY + echo '| Build Number | ${{ steps.setup.outputs.build_number }} |' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/android_build_store_upload.yml b/.github/workflows/android_build_store_upload.yml index 9ed9c96..4d5f99c 100644 --- a/.github/workflows/android_build_store_upload.yml +++ b/.github/workflows/android_build_store_upload.yml @@ -75,55 +75,29 @@ jobs: env: AAB_STAGING_DIR: .tmp/publishing_aab steps: - # Checkout repository and submodules - - name: Checkout - uses: actions/checkout@v6.0.2 + - name: Setup Android app build environment + id: setup + uses: ./.github/actions/android-app-setup with: - token: ${{ secrets.ANDROID_JENKINS_PAT }} - submodules: 'recursive' - lfs: ${{ inputs.use-git-lfs }} - - # Set build variables for reuse in multiple steps - - name: Set Build Variables - id: vars - shell: bash - run: | - flavor=${{ inputs.flavor }} - appModulePath=${{ inputs.app-module }} - appModulePath=${appModulePath//:/\/} - echo "flavor_capitalized=${flavor~}" >> "$GITHUB_OUTPUT" - echo "app_module_path=$appModulePath" >> "$GITHUB_OUTPUT" - - buildId=$(cat /proc/sys/kernel/random/uuid) - echo "build_id=$buildId" >> "$GITHUB_OUTPUT" - buildNumber=${{ github.run_number }} - echo "build_number=$buildNumber" >> "$GITHUB_OUTPUT" - echo "build_batch=release${{ github.run_id }}" >> "$GITHUB_OUTPUT" - - # Setup JDK environment - - name: Set up JDK - uses: actions/setup-java@v5.2.0 - with: - distribution: 'zulu' - java-version: ${{ inputs.jdk }} - - # Setup rust Tool Chain - - name: Setup rust Tool Chain - uses: actions-rust-lang/setup-rust-toolchain@v1.15.4 - if: ${{ inputs.setup-rust-tool-chain }} + checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} + use-git-lfs: ${{ inputs.use-git-lfs }} + jdk: ${{ inputs.jdk }} + setup-rust: ${{ inputs.setup-rust-tool-chain }} + flavor: ${{ inputs.flavor }} + app-module: ${{ inputs.app-module }} # Build the app - name: Build app run: | - ./gradlew :${{ inputs.app-module }}:bundle${{ steps.vars.outputs.flavor_capitalized }}ReleaseUpload \ + ./gradlew :${{ inputs.app-module }}:bundle${{ steps.setup.outputs.flavor_capitalized }}ReleaseUpload \ ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} \ -PubiqueMavenUrl=${{ secrets.UB_ARTIFACTORY_URL_ANDROID }} \ -PubiqueMavenUser=${{ secrets.UB_ARTIFACTORY_USER }} \ -PubiqueMavenPass=${{ secrets.UB_ARTIFACTORY_PASSWORD }} \ -PubiquePoEditorAPIKey=${{ secrets.UBIQUE_POEDITOR_API_KEY }} \ - -Pbuild_id=${{ steps.vars.outputs.build_id }} \ - -Pbuild_number=${{ steps.vars.outputs.build_number }} \ - -Pbuild_batch=${{ steps.vars.outputs.build_batch }} \ + -Pbuild_id=${{ steps.setup.outputs.build_id }} \ + -Pbuild_number=${{ steps.setup.outputs.build_number }} \ + -Pbuild_batch=${{ steps.setup.outputs.build_batch }} \ -Pbranch=${{ github.ref_name }} \ -PcommitHash=${{ github.sha }} \ ${{ secrets.ADDITIONAL_GRADLE_PROPS }} @@ -137,7 +111,7 @@ jobs: - name: Stage AAB run: | mkdir -p "$AAB_STAGING_DIR" - cp "${{ steps.vars.outputs.app_module_path }}"/build/outputs/bundle/${{ inputs.flavor }}ReleaseUpload/*.aab "$AAB_STAGING_DIR" + cp "${{ steps.setup.outputs.app_module_path }}"/build/outputs/bundle/${{ inputs.flavor }}ReleaseUpload/*.aab "$AAB_STAGING_DIR" # Upload the .aab artifact - name: Save app artifact @@ -150,7 +124,7 @@ jobs: # Publish the .aab to the play store - name: Upload app artifact run: | - ./gradlew :${{ inputs.app-module }}:publish${{ steps.vars.outputs.flavor_capitalized }}ReleaseUploadBundle \ + ./gradlew :${{ inputs.app-module }}:publish${{ steps.setup.outputs.flavor_capitalized }}ReleaseUploadBundle \ ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} \ --artifact-dir "$AAB_STAGING_DIR" \ -PubiqueMavenUrl=${{ secrets.UB_ARTIFACTORY_URL_ANDROID }} \ diff --git a/.github/workflows/android_code_quality.yml b/.github/workflows/android_code_quality.yml index 4f8b2a3..f7083fc 100644 --- a/.github/workflows/android_code_quality.yml +++ b/.github/workflows/android_code_quality.yml @@ -88,47 +88,36 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true steps: - # Checkout repository and submodules - - name: Checkout - uses: actions/checkout@v6.0.2 + - name: Setup Android app build environment + id: setup + uses: ./.github/actions/android-app-setup with: - token: ${{ secrets.ANDROID_JENKINS_PAT }} - submodules: 'recursive' - lfs: ${{ inputs.use-git-lfs }} - - # Set build variables for reuse in multiple steps - - name: Set Build Variables - id: vars + checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} + use-git-lfs: ${{ inputs.use-git-lfs }} + jdk: ${{ inputs.jdk }} + setup-rust: ${{ inputs.setup-rust-tool-chain }} + flavor: ${{ inputs.flavor }} + app-module: ${{ inputs.app-module }} + + # Set Gradle properties for reuse in multiple steps + - name: Set Gradle Properties + id: gradle shell: bash run: | - export flavor=${{ inputs.flavor }} - appModulePath=${{ inputs.app-module }} - appModulePath=${appModulePath//:/\/} - echo "flavor_capitalized=${flavor~}" >> "$GITHUB_OUTPUT" - echo "app_module_path=$appModulePath" >> "$GITHUB_OUTPUT" - export gradleProps="-PsentryAuthToken=${{ secrets.SENTRY_AUTH_TOKEN }} -PubiqueMavenUrl=${{ secrets.UB_ARTIFACTORY_URL_ANDROID }} -PubiqueMavenUser=${{ secrets.UB_ARTIFACTORY_USER }} -PubiqueMavenPass=${{ secrets.UB_ARTIFACTORY_PASSWORD }} -PubiquePoEditorAPIKey=${{ secrets.UBIQUE_POEDITOR_API_KEY }} ${{ secrets.ADDITIONAL_GRADLE_PROPS }}" + gradleProps="-PsentryAuthToken=${{ secrets.SENTRY_AUTH_TOKEN }} -PubiqueMavenUrl=${{ secrets.UB_ARTIFACTORY_URL_ANDROID }} -PubiqueMavenUser=${{ secrets.UB_ARTIFACTORY_USER }} -PubiqueMavenPass=${{ secrets.UB_ARTIFACTORY_PASSWORD }} -PubiquePoEditorAPIKey=${{ secrets.UBIQUE_POEDITOR_API_KEY }} ${{ secrets.ADDITIONAL_GRADLE_PROPS }}" echo "gradle_properties=$gradleProps" >> "$GITHUB_OUTPUT" - # Setup JDK environment - - name: Install zstd - run: sudo apt-get install -y zstd - - # Setup rust Tool Chain - - name: Setup rust Tool Chain - uses: actions-rust-lang/setup-rust-toolchain@v1.15.4 - if: ${{ inputs.setup-rust-tool-chain }} - # Run Unit Tests - name: Run Unit Tests id: tests if: ${{ fromJSON(inputs.run-tests) }} - run: ./gradlew :${{ inputs.app-module }}:test${{ steps.vars.outputs.flavor_capitalized }}DebugUnitTest ${{ steps.vars.outputs.gradle_properties }} ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} --daemon + run: ./gradlew :${{ inputs.app-module }}:test${{ steps.setup.outputs.flavor_capitalized }}DebugUnitTest ${{ steps.gradle.outputs.gradle_properties }} ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} --daemon # Run Android Lint checks - name: Run Lint id: lint if: ${{ fromJSON(inputs.run-lint) }} - run: ./gradlew :${{ inputs.app-module }}:lint${{ steps.vars.outputs.flavor_capitalized }}Debug ${{ steps.vars.outputs.gradle_properties }} ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} --daemon + run: ./gradlew :${{ inputs.app-module }}:lint${{ steps.setup.outputs.flavor_capitalized }}Debug ${{ steps.gradle.outputs.gradle_properties }} ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} --daemon # Run Sonarqube code analysis - name: Run Sonarqube @@ -137,7 +126,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.ANDROID_JENKINS_PAT }} SONAR_TOKEN: ${{ secrets.UBIQUE_SONAR_TOKEN }} - run: ./gradlew :${{ inputs.app-module }}:sonar ${{ steps.vars.outputs.gradle_properties }} ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} --daemon + run: ./gradlew :${{ inputs.app-module }}:sonar ${{ steps.gradle.outputs.gradle_properties }} ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} --daemon # Publish test results to pull requests - name: Publish Unit Test Results @@ -145,7 +134,8 @@ jobs: uses: EnricoMi/publish-unit-test-result-action@v2.21.0 with: check_name: 'Unit Test Results' - files: ${{ steps.vars.outputs.app_module_path }}/build/test-results/**/*.xml + files: ${{ steps.setup.outputs.app_module_path }}/build/test-results/**/*.xml + coeus: if: ${{ github.event_name == 'pull_request' && fromJSON(inputs.run-coeus) }} name: Run coeus binary analysis @@ -159,42 +149,39 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }}-coeus cancel-in-progress: true steps: - # Checkout repository and submodules - - name: Checkout - uses: actions/checkout@v6.0.2 + - name: Setup Android app build environment + id: setup + uses: ./.github/actions/android-app-setup with: - token: ${{ secrets.ANDROID_JENKINS_PAT }} - submodules: 'recursive' - lfs: ${{ inputs.use-git-lfs }} - - # Set build variables for reuse in multiple steps - - name: Set Build Variables - id: vars + checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} + use-git-lfs: ${{ inputs.use-git-lfs }} + jdk: ${{ inputs.jdk }} + setup-rust: ${{ inputs.setup-rust-tool-chain }} + flavor: ${{ inputs.flavor }} + app-module: ${{ inputs.app-module }} + + # Set Gradle properties for reuse in multiple steps + - name: Set Gradle Properties + id: gradle shell: bash run: | - export flavor=${{ inputs.flavor }} - appModulePath=${{ inputs.app-module }} - appModulePath=${appModulePath//:/\/} - echo "flavor_capitalized=${flavor~}" >> "$GITHUB_OUTPUT" - echo "app_module_path=$appModulePath" >> "$GITHUB_OUTPUT" - export gradleProps="-PsentryAuthToken=${{ secrets.SENTRY_AUTH_TOKEN }} -PubiqueMavenUrl=${{ secrets.UB_ARTIFACTORY_URL_ANDROID }} -PubiqueMavenUser=${{ secrets.UB_ARTIFACTORY_USER }} -PubiqueMavenPass=${{ secrets.UB_ARTIFACTORY_PASSWORD }} -PubiquePoEditorAPIKey=${{ secrets.UBIQUE_POEDITOR_API_KEY }} ${{ secrets.ADDITIONAL_GRADLE_PROPS }}" + gradleProps="-PsentryAuthToken=${{ secrets.SENTRY_AUTH_TOKEN }} -PubiqueMavenUrl=${{ secrets.UB_ARTIFACTORY_URL_ANDROID }} -PubiqueMavenUser=${{ secrets.UB_ARTIFACTORY_USER }} -PubiqueMavenPass=${{ secrets.UB_ARTIFACTORY_PASSWORD }} -PubiquePoEditorAPIKey=${{ secrets.UBIQUE_POEDITOR_API_KEY }} ${{ secrets.ADDITIONAL_GRADLE_PROPS }}" echo "gradle_properties=$gradleProps" >> "$GITHUB_OUTPUT" - - name: Install zstd - run: sudo apt-get install -y zstd - # Run Coeus - name: Assemble the APK for static code analysis id: coeus-assemble - run: ./gradlew :${{ inputs.app-module }}:assemble${{ steps.vars.outputs.flavor_capitalized }}Release ${{ steps.vars.outputs.gradle_properties }} ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} --daemon + run: ./gradlew :${{ inputs.app-module }}:assemble${{ steps.setup.outputs.flavor_capitalized }}Release ${{ steps.gradle.outputs.gradle_properties }} ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} --daemon + - name: Find APK and Mapping id: find-apk shell: bash run: | - export apk=`find $GITHUB_WORKSPACE/${{ steps.vars.outputs.app_module_path }}/build/outputs/apk/ -name '*.apk'` - export mapping=`find $GITHUB_WORKSPACE/${{ steps.vars.outputs.app_module_path }}/build/outputs/mapping/ -name 'mapping.txt' || true` + export apk=`find $GITHUB_WORKSPACE/${{ steps.setup.outputs.app_module_path }}/build/outputs/apk/ -name '*.apk'` + export mapping=`find $GITHUB_WORKSPACE/${{ steps.setup.outputs.app_module_path }}/build/outputs/mapping/ -name 'mapping.txt' || true` echo "apk=${apk//__w/home\/runner\/_work\/}" >> $GITHUB_OUTPUT echo "mapping=${mapping//__w/home\/runner\/_work\/}" >> $GITHUB_OUTPUT + - name: Docker login for Azure registry id: coeus-docker-login uses: azure/docker-login@v2 diff --git a/.github/workflows/android_gradle_task.yml b/.github/workflows/android_gradle_task.yml index dc41882..2be98c2 100644 --- a/.github/workflows/android_gradle_task.yml +++ b/.github/workflows/android_gradle_task.yml @@ -33,6 +33,9 @@ on: type: boolean description: 'Use git lfs during repository checkout' secrets: + ANDROID_JENKINS_PAT: + required: false + description: 'Optional PAT for checking out private repositories or submodules. Falls back to the default GITHUB_TOKEN if not set.' UB_ARTIFACTORY_URL: required: true UB_ARTIFACTORY_REPO_ANDROID: @@ -56,11 +59,12 @@ jobs: group: ${{ inputs.concurrency-group }} cancel-in-progress: true steps: - - uses: actions/checkout@v6.0.2 + - name: Setup Android environment + uses: ./.github/actions/android-base-setup with: - lfs: ${{ inputs.use-git-lfs }} - - name: Install zstd - run: sudo apt-get install -y zstd + checkout-token: ${{ secrets.ANDROID_JENKINS_PAT || github.token }} + use-git-lfs: ${{ inputs.use-git-lfs }} + setup-jdk: 'false' - name: Run Gradle task run: ./gradlew ${{ inputs.task }} ${{ inputs.gradle-args }} ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} diff --git a/.github/workflows/android_library_artifactory.yml b/.github/workflows/android_library_artifactory.yml index 6e8863b..a9a9032 100644 --- a/.github/workflows/android_library_artifactory.yml +++ b/.github/workflows/android_library_artifactory.yml @@ -28,6 +28,10 @@ on: required: false default: '21' description: The JDK version to use. Default is 21. + setup-rust-tool-chain: + required: false + default: false + type: boolean use-git-lfs: required: false default: false @@ -43,7 +47,6 @@ on: UB_ARTIFACTORY_PASSWORD: required: true - jobs: build: name: Build library @@ -57,20 +60,13 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true steps: - # Checkout repository and submodules - - name: Checkout - uses: actions/checkout@v6.0.2 - with: - token: ${{ secrets.ANDROID_JENKINS_PAT }} - submodules: 'recursive' - lfs: ${{ inputs.use-git-lfs }} - - # Setup JDK environment - - name: Set up JDK - uses: actions/setup-java@v5.2.0 + - name: Setup Android environment + uses: ./.github/actions/android-base-setup with: - distribution: 'zulu' - java-version: ${{ inputs.jdk }} + checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} + use-git-lfs: ${{ inputs.use-git-lfs }} + jdk: ${{ inputs.jdk }} + setup-rust: ${{ inputs.setup-rust-tool-chain }} # Append version name suffix - name: Append version name suffix From 8822b8c219d195cdf34ebb28e043805c73a60965 Mon Sep 17 00:00:00 2001 From: Florian Buenzli Date: Wed, 22 Apr 2026 14:12:55 +0200 Subject: [PATCH 2/8] separate ssh setup --- .github/actions/ssh-setup/action.yml | 37 +++++++++++++++++++ .../workflows/android_build_alpaka_upload.yml | 34 ++--------------- 2 files changed, 40 insertions(+), 31 deletions(-) create mode 100644 .github/actions/ssh-setup/action.yml diff --git a/.github/actions/ssh-setup/action.yml b/.github/actions/ssh-setup/action.yml new file mode 100644 index 0000000..7d9bdf9 --- /dev/null +++ b/.github/actions/ssh-setup/action.yml @@ -0,0 +1,37 @@ +name: SSH Setup +description: > + Ensures ~/.ssh is a valid directory, loads the given private key via ssh-agent, + and adds the GitHub host key fingerprints to known_hosts. + +inputs: + ssh-private-key: + description: 'The SSH private key to load into the ssh-agent.' + required: true + +runs: + using: composite + steps: + - name: Ensure ~/.ssh is a directory + shell: bash + run: | + if [ -e "$HOME/.ssh" ] && [ ! -d "$HOME/.ssh" ]; then + echo "~/.ssh exists but is not a directory. Deleting it..." + rm -f "$HOME/.ssh" + echo "Removed ~/.ssh." + else + echo "~/.ssh is either a directory or does not exist. No action needed." + fi + + - name: Add SSH Key + uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 + with: + ssh-private-key: ${{ inputs.ssh-private-key }} + + - name: Add GitHub SSH keys to the known_hosts file + shell: bash + run: | + cat >> ~/.ssh/known_hosts <> ~/.ssh/known_hosts < Date: Wed, 22 Apr 2026 22:36:16 +0200 Subject: [PATCH 3/8] split play store upload jobs --- .../workflows/android_build_store_upload.yml | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android_build_store_upload.yml b/.github/workflows/android_build_store_upload.yml index 4d5f99c..0daa582 100644 --- a/.github/workflows/android_build_store_upload.yml +++ b/.github/workflows/android_build_store_upload.yml @@ -74,6 +74,9 @@ jobs: cancel-in-progress: true env: AAB_STAGING_DIR: .tmp/publishing_aab + outputs: + flavor_capitalized: ${{ steps.setup.outputs.flavor_capitalized }} + app_module_path: ${{ steps.setup.outputs.app_module_path }} steps: - name: Setup Android app build environment id: setup @@ -113,7 +116,7 @@ jobs: mkdir -p "$AAB_STAGING_DIR" cp "${{ steps.setup.outputs.app_module_path }}"/build/outputs/bundle/${{ inputs.flavor }}ReleaseUpload/*.aab "$AAB_STAGING_DIR" - # Upload the .aab artifact + # Upload the .aab artifact so the upload job (and humans) can download it - name: Save app artifact uses: actions/upload-artifact@v7.0.1 with: @@ -121,10 +124,34 @@ jobs: path: ${{ env.AAB_STAGING_DIR }}/*.aab compression-level: 0 + publish: + name: Publish ${{ inputs.flavor }} to Play Store + needs: build + runs-on: ${{ fromJSON(inputs.runs-on) }} + container: + image: cimg/android:${{ inputs.android-image-version }} + timeout-minutes: 30 + env: + AAB_STAGING_DIR: .tmp/publishing_aab + steps: + - name: Setup Android environment + uses: ./.github/actions/android-app-setup + with: + checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} + jdk: ${{ inputs.jdk }} + flavor: ${{ inputs.flavor }} + app-module: ${{ inputs.app-module }} + + - name: Download app artifact + uses: actions/download-artifact@v4 + with: + name: app-bundle + path: ${{ env.AAB_STAGING_DIR }} + # Publish the .aab to the play store - name: Upload app artifact run: | - ./gradlew :${{ inputs.app-module }}:publish${{ steps.setup.outputs.flavor_capitalized }}ReleaseUploadBundle \ + ./gradlew :${{ inputs.app-module }}:publish${{ needs.build.outputs.flavor_capitalized }}ReleaseUploadBundle \ ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} \ --artifact-dir "$AAB_STAGING_DIR" \ -PubiqueMavenUrl=${{ secrets.UB_ARTIFACTORY_URL_ANDROID }} \ From 1a6a5d85a6013eba5ca52d3bc1bea2bcc3c00d24 Mon Sep 17 00:00:00 2001 From: Florian Buenzli Date: Fri, 1 May 2026 16:31:56 +0200 Subject: [PATCH 4/8] tidied up action inputs --- .github/actions/android-app-setup/action.yml | 18 ++++++++---------- .github/actions/android-base-setup/action.yml | 17 +++++++---------- .github/actions/ssh-setup/action.yml | 5 ++--- .../workflows/android_build_alpaka_upload.yml | 8 +++++--- .../workflows/android_build_store_upload.yml | 8 +++++--- .github/workflows/android_code_quality.yml | 11 ++++++++--- .github/workflows/android_gradle_task.yml | 8 +++++++- .../workflows/android_library_artifactory.yml | 4 ++-- 8 files changed, 44 insertions(+), 35 deletions(-) diff --git a/.github/actions/android-app-setup/action.yml b/.github/actions/android-app-setup/action.yml index 7e5c812..673cc07 100644 --- a/.github/actions/android-app-setup/action.yml +++ b/.github/actions/android-app-setup/action.yml @@ -1,26 +1,25 @@ name: Setup Android App Build -description: > - Extended setup for Android app build jobs (Alpaka, Play Store, code quality). - Calls android-base-setup and then computes build variables derived from the - flavor and app module inputs. - All inputs must be supplied by the caller — defaults live in the workflow files. +description: Extended setup for Android app build jobs. inputs: checkout-token: - description: 'Token used for checkout. Falls back to the default GITHUB_TOKEN if not set.' - default: ${{ github.token }} + description: 'Token used for checkout.' + required: true use-git-lfs: description: 'Use git lfs during repository checkout.' - fetch-depth: - description: 'Number of commits to fetch during checkout.' + required: true jdk: description: 'The JDK version to use.' + required: true setup-rust: description: 'Whether to set up the Rust toolchain.' + required: true flavor: description: 'The build flavor. Used to compute flavor_capitalized.' + required: true app-module: description: 'The Gradle app module (e.g. "app" or "android:androidApp").' + required: true outputs: flavor_capitalized: @@ -47,7 +46,6 @@ runs: with: checkout-token: ${{ inputs.checkout-token }} use-git-lfs: ${{ inputs.use-git-lfs }} - fetch-depth: ${{ inputs.fetch-depth }} jdk: ${{ inputs.jdk }} setup-rust: ${{ inputs.setup-rust }} diff --git a/.github/actions/android-base-setup/action.yml b/.github/actions/android-base-setup/action.yml index d4b082f..0e50417 100644 --- a/.github/actions/android-base-setup/action.yml +++ b/.github/actions/android-base-setup/action.yml @@ -1,23 +1,21 @@ name: Setup Android Environment description: > Base setup for Android CI jobs. Checks out the repository, installs zstd, - optionally sets up a JDK, and optionally sets up the Rust toolchain. - All inputs must be supplied by the caller — defaults live in the workflow files. + sets up a JDK, and optionally sets up the Rust toolchain. inputs: checkout-token: - description: 'Token used for checkout. Falls back to the default GITHUB_TOKEN if not set.' - default: ${{ github.token }} + description: 'Token used for checkout.' + required: true use-git-lfs: description: 'Use git lfs during repository checkout.' - fetch-depth: - description: 'Number of commits to fetch during checkout.' - setup-jdk: - description: 'Whether to set up a JDK.' + required: true jdk: description: 'The JDK version to use.' + required: true setup-rust: description: 'Whether to set up the Rust toolchain.' + required: true runs: using: composite @@ -28,10 +26,9 @@ runs: token: ${{ inputs.checkout-token }} submodules: 'recursive' lfs: ${{ inputs.use-git-lfs }} - fetch-depth: ${{ inputs.fetch-depth }} + fetch-depth: 10 - name: Set up JDK - if: ${{ inputs.setup-jdk != 'false' }} uses: actions/setup-java@v5.2.0 with: distribution: 'zulu' diff --git a/.github/actions/ssh-setup/action.yml b/.github/actions/ssh-setup/action.yml index 7d9bdf9..344509f 100644 --- a/.github/actions/ssh-setup/action.yml +++ b/.github/actions/ssh-setup/action.yml @@ -17,10 +17,9 @@ runs: if [ -e "$HOME/.ssh" ] && [ ! -d "$HOME/.ssh" ]; then echo "~/.ssh exists but is not a directory. Deleting it..." rm -f "$HOME/.ssh" - echo "Removed ~/.ssh." - else - echo "~/.ssh is either a directory or does not exist. No action needed." fi + mkdir -p "$HOME/.ssh" + chmod 700 "$HOME/.ssh" - name: Add SSH Key uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 diff --git a/.github/workflows/android_build_alpaka_upload.yml b/.github/workflows/android_build_alpaka_upload.yml index 3361674..90655aa 100644 --- a/.github/workflows/android_build_alpaka_upload.yml +++ b/.github/workflows/android_build_alpaka_upload.yml @@ -25,7 +25,7 @@ on: default: '' required: false description: 'Suffix to the working directory of the script, only used for gradle build. Must end with a slash or be empty.' - setup-rust-tool-chain: + setup-rust: required: false default: false type: boolean @@ -110,12 +110,14 @@ jobs: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} jdk: ${{ inputs.jdk }} - setup-rust: ${{ inputs.setup-rust-tool-chain }} + setup-rust: ${{ inputs.setup-rust }} flavor: ${{ inputs.flavor }} app-module: ${{ inputs.app-module }} - name: Setup SSH - if: ${{ secrets.SSH_KEY != '' }} + env: + SSH_KEY: ${{ secrets.SSH_KEY }} + if: ${{ env.SSH_KEY != '' }} uses: ./.github/actions/ssh-setup with: ssh-private-key: ${{ secrets.SSH_KEY }} diff --git a/.github/workflows/android_build_store_upload.yml b/.github/workflows/android_build_store_upload.yml index 0daa582..c002d0a 100644 --- a/.github/workflows/android_build_store_upload.yml +++ b/.github/workflows/android_build_store_upload.yml @@ -11,7 +11,7 @@ on: required: false default: 'app' description: 'The gradle app module (e.g. custom "android:androidApp")' - setup-rust-tool-chain: + setup-rust: required: false default: false type: boolean @@ -85,7 +85,7 @@ jobs: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} jdk: ${{ inputs.jdk }} - setup-rust: ${{ inputs.setup-rust-tool-chain }} + setup-rust: ${{ inputs.setup-rust }} flavor: ${{ inputs.flavor }} app-module: ${{ inputs.app-module }} @@ -100,7 +100,7 @@ jobs: -PubiquePoEditorAPIKey=${{ secrets.UBIQUE_POEDITOR_API_KEY }} \ -Pbuild_id=${{ steps.setup.outputs.build_id }} \ -Pbuild_number=${{ steps.setup.outputs.build_number }} \ - -Pbuild_batch=${{ steps.setup.outputs.build_batch }} \ + -Pbuild_batch=release${{ steps.setup.outputs.build_batch }} \ -Pbranch=${{ github.ref_name }} \ -PcommitHash=${{ github.sha }} \ ${{ secrets.ADDITIONAL_GRADLE_PROPS }} @@ -138,7 +138,9 @@ jobs: uses: ./.github/actions/android-app-setup with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} + use-git-lfs: ${{ inputs.use-git-lfs }} jdk: ${{ inputs.jdk }} + setup-rust: false flavor: ${{ inputs.flavor }} app-module: ${{ inputs.app-module }} diff --git a/.github/workflows/android_code_quality.yml b/.github/workflows/android_code_quality.yml index f7083fc..90697c0 100644 --- a/.github/workflows/android_code_quality.yml +++ b/.github/workflows/android_code_quality.yml @@ -40,10 +40,15 @@ on: required: false default: '2026.03.1-ndk' description: The Android image version to use. Default is 2026.03.1-ndk. - setup-rust-tool-chain: + setup-rust: required: false default: false type: boolean + jdk: + type: string + required: false + default: '21' + description: 'The JDK version to use. Default is 21.' use-git-lfs: required: false default: false @@ -95,7 +100,7 @@ jobs: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} jdk: ${{ inputs.jdk }} - setup-rust: ${{ inputs.setup-rust-tool-chain }} + setup-rust: ${{ inputs.setup-rust }} flavor: ${{ inputs.flavor }} app-module: ${{ inputs.app-module }} @@ -156,7 +161,7 @@ jobs: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} jdk: ${{ inputs.jdk }} - setup-rust: ${{ inputs.setup-rust-tool-chain }} + setup-rust: ${{ inputs.setup-rust }} flavor: ${{ inputs.flavor }} app-module: ${{ inputs.app-module }} diff --git a/.github/workflows/android_gradle_task.yml b/.github/workflows/android_gradle_task.yml index 2be98c2..2ae72c8 100644 --- a/.github/workflows/android_gradle_task.yml +++ b/.github/workflows/android_gradle_task.yml @@ -32,6 +32,11 @@ on: default: false type: boolean description: 'Use git lfs during repository checkout' + jdk: + type: string + required: false + default: '21' + description: 'The JDK version to use. Default is 21.' secrets: ANDROID_JENKINS_PAT: required: false @@ -64,7 +69,8 @@ jobs: with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT || github.token }} use-git-lfs: ${{ inputs.use-git-lfs }} - setup-jdk: 'false' + jdk: ${{ inputs.jdk }} + setup-rust: 'false' - name: Run Gradle task run: ./gradlew ${{ inputs.task }} ${{ inputs.gradle-args }} ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} diff --git a/.github/workflows/android_library_artifactory.yml b/.github/workflows/android_library_artifactory.yml index a9a9032..275e56d 100644 --- a/.github/workflows/android_library_artifactory.yml +++ b/.github/workflows/android_library_artifactory.yml @@ -28,7 +28,7 @@ on: required: false default: '21' description: The JDK version to use. Default is 21. - setup-rust-tool-chain: + setup-rust: required: false default: false type: boolean @@ -66,7 +66,7 @@ jobs: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} jdk: ${{ inputs.jdk }} - setup-rust: ${{ inputs.setup-rust-tool-chain }} + setup-rust: ${{ inputs.setup-rust }} # Append version name suffix - name: Append version name suffix From 3af340afc8f9066af283c13a753e75c65071d848 Mon Sep 17 00:00:00 2001 From: Florian Buenzli Date: Fri, 1 May 2026 22:00:55 +0200 Subject: [PATCH 5/8] hardcoded action ref --- .github/workflows/android_build_alpaka_upload.yml | 4 ++-- .github/workflows/android_build_store_upload.yml | 4 ++-- .github/workflows/android_code_quality.yml | 4 ++-- .github/workflows/android_gradle_task.yml | 2 +- .github/workflows/android_library_artifactory.yml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/android_build_alpaka_upload.yml b/.github/workflows/android_build_alpaka_upload.yml index 90655aa..df0c0f1 100644 --- a/.github/workflows/android_build_alpaka_upload.yml +++ b/.github/workflows/android_build_alpaka_upload.yml @@ -105,7 +105,7 @@ jobs: steps: - name: Setup Android app build environment id: setup - uses: ./.github/actions/android-app-setup + uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@feature/composite-actions with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} @@ -118,7 +118,7 @@ jobs: env: SSH_KEY: ${{ secrets.SSH_KEY }} if: ${{ env.SSH_KEY != '' }} - uses: ./.github/actions/ssh-setup + uses: UbiqueInnovation/actions-android/.github/actions/ssh-setup@feature/composite-actions with: ssh-private-key: ${{ secrets.SSH_KEY }} diff --git a/.github/workflows/android_build_store_upload.yml b/.github/workflows/android_build_store_upload.yml index c002d0a..97835c7 100644 --- a/.github/workflows/android_build_store_upload.yml +++ b/.github/workflows/android_build_store_upload.yml @@ -80,7 +80,7 @@ jobs: steps: - name: Setup Android app build environment id: setup - uses: ./.github/actions/android-app-setup + uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@feature/composite-actions with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} @@ -135,7 +135,7 @@ jobs: AAB_STAGING_DIR: .tmp/publishing_aab steps: - name: Setup Android environment - uses: ./.github/actions/android-app-setup + uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@feature/composite-actions with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} diff --git a/.github/workflows/android_code_quality.yml b/.github/workflows/android_code_quality.yml index 90697c0..8f311be 100644 --- a/.github/workflows/android_code_quality.yml +++ b/.github/workflows/android_code_quality.yml @@ -95,7 +95,7 @@ jobs: steps: - name: Setup Android app build environment id: setup - uses: ./.github/actions/android-app-setup + uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@feature/composite-actions with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} @@ -156,7 +156,7 @@ jobs: steps: - name: Setup Android app build environment id: setup - uses: ./.github/actions/android-app-setup + uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@feature/composite-actions with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} diff --git a/.github/workflows/android_gradle_task.yml b/.github/workflows/android_gradle_task.yml index 2ae72c8..a645715 100644 --- a/.github/workflows/android_gradle_task.yml +++ b/.github/workflows/android_gradle_task.yml @@ -65,7 +65,7 @@ jobs: cancel-in-progress: true steps: - name: Setup Android environment - uses: ./.github/actions/android-base-setup + uses: UbiqueInnovation/actions-android/.github/actions/android-base-setup@feature/composite-actions with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT || github.token }} use-git-lfs: ${{ inputs.use-git-lfs }} diff --git a/.github/workflows/android_library_artifactory.yml b/.github/workflows/android_library_artifactory.yml index 275e56d..e4a28e5 100644 --- a/.github/workflows/android_library_artifactory.yml +++ b/.github/workflows/android_library_artifactory.yml @@ -61,7 +61,7 @@ jobs: cancel-in-progress: true steps: - name: Setup Android environment - uses: ./.github/actions/android-base-setup + uses: UbiqueInnovation/actions-android/.github/actions/android-base-setup@feature/composite-actions with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} From 65e4d692e4c14532ca2575fc8ab564a5c9e92b3e Mon Sep 17 00:00:00 2001 From: Florian Buenzli Date: Sat, 2 May 2026 00:22:21 +0200 Subject: [PATCH 6/8] fixed action reference --- .github/actions/android-app-setup/action.yml | 2 +- .github/workflows/android_build_alpaka_upload.yml | 4 ++-- .github/workflows/android_code_quality.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/android-app-setup/action.yml b/.github/actions/android-app-setup/action.yml index 673cc07..0ee06c8 100644 --- a/.github/actions/android-app-setup/action.yml +++ b/.github/actions/android-app-setup/action.yml @@ -42,7 +42,7 @@ runs: using: composite steps: - name: Setup Android environment - uses: ./.github/actions/android-base-setup + uses: UbiqueInnovation/actions-android/.github/actions/android-base-setup@feature/composite-actions with: checkout-token: ${{ inputs.checkout-token }} use-git-lfs: ${{ inputs.use-git-lfs }} diff --git a/.github/workflows/android_build_alpaka_upload.yml b/.github/workflows/android_build_alpaka_upload.yml index df0c0f1..6d5a094 100644 --- a/.github/workflows/android_build_alpaka_upload.yml +++ b/.github/workflows/android_build_alpaka_upload.yml @@ -127,10 +127,10 @@ jobs: if: ${{ inputs.pre-build-script }} run: ${{ inputs.pre-build-script }} - - name: write build_id to file + - name: Write build_id to file run: echo "${{ steps.setup.outputs.build_id }}" > build_id.txt - - name: upload build_id as artifact + - name: Upload build_id as artifact uses: actions/upload-artifact@v7.0.1 with: name: ${{ inputs.flavor }}_build_id diff --git a/.github/workflows/android_code_quality.yml b/.github/workflows/android_code_quality.yml index 8f311be..aeea589 100644 --- a/.github/workflows/android_code_quality.yml +++ b/.github/workflows/android_code_quality.yml @@ -66,7 +66,7 @@ on: UBIQUE_POEDITOR_API_KEY: required: true UBIQUE_SONAR_TOKEN: - required: true + required: false ACR_REGISTRY: required: false description: Required if run-coeus is true From 1692a7868ec804156af9fadc0ac5dbd393f8c221 Mon Sep 17 00:00:00 2001 From: Florian Buenzli Date: Sun, 3 May 2026 01:15:47 +0200 Subject: [PATCH 7/8] action step name improvements --- .github/workflows/android_build_alpaka_upload.yml | 8 +++----- .github/workflows/android_build_store_upload.yml | 11 +++++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/android_build_alpaka_upload.yml b/.github/workflows/android_build_alpaka_upload.yml index 6d5a094..13871ed 100644 --- a/.github/workflows/android_build_alpaka_upload.yml +++ b/.github/workflows/android_build_alpaka_upload.yml @@ -90,7 +90,7 @@ on: jobs: build: - name: Build ${{ inputs.flavor }} Flavor + name: Build flavor ${{ inputs.flavor }} runs-on: ${{ fromJSON(inputs.runs-on) }} container: image: cimg/android:${{ inputs.android-image-version }} @@ -122,8 +122,7 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_KEY }} - # Run prebuild script - - name: "Pre Build Script" + - name: Pre Build Script if: ${{ inputs.pre-build-script }} run: ${{ inputs.pre-build-script }} @@ -164,8 +163,7 @@ jobs: # Write Alpaka build info to GitHub job summary - name: Alpaka Build Summary run: | - echo '### Alpaka Build Info' >> $GITHUB_STEP_SUMMARY - echo '| | |' >> $GITHUB_STEP_SUMMARY + echo '| **Alpaka Build Info** | |' >> $GITHUB_STEP_SUMMARY echo '|---|---|' >> $GITHUB_STEP_SUMMARY echo '| Build Batch | ${{ steps.setup.outputs.build_batch }} |' >> $GITHUB_STEP_SUMMARY echo '| Build ID | ${{ steps.setup.outputs.build_id }} |' >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/android_build_store_upload.yml b/.github/workflows/android_build_store_upload.yml index 97835c7..4f2a8d7 100644 --- a/.github/workflows/android_build_store_upload.yml +++ b/.github/workflows/android_build_store_upload.yml @@ -63,7 +63,7 @@ on: jobs: build: - name: Build ${{ inputs.flavor }} Flavor + name: Build flavor ${{ inputs.flavor }} runs-on: ${{ fromJSON(inputs.runs-on) }} container: image: cimg/android:${{ inputs.android-image-version }} @@ -124,8 +124,8 @@ jobs: path: ${{ env.AAB_STAGING_DIR }}/*.aab compression-level: 0 - publish: - name: Publish ${{ inputs.flavor }} to Play Store + upload: + name: Upload flavor ${{ inputs.flavor }} to Play Store needs: build runs-on: ${{ fromJSON(inputs.runs-on) }} container: @@ -144,14 +144,13 @@ jobs: flavor: ${{ inputs.flavor }} app-module: ${{ inputs.app-module }} - - name: Download app artifact + - name: Download app bundle uses: actions/download-artifact@v4 with: name: app-bundle path: ${{ env.AAB_STAGING_DIR }} - # Publish the .aab to the play store - - name: Upload app artifact + - name: Upload to Play Store run: | ./gradlew :${{ inputs.app-module }}:publish${{ needs.build.outputs.flavor_capitalized }}ReleaseUploadBundle \ ${{ github.run_attempt > 1 && '--stacktrace --info' || '' }} \ From 1fd6fc2116eff33e643f9b4ef11b53a27060561c Mon Sep 17 00:00:00 2001 From: Florian Buenzli Date: Tue, 12 May 2026 11:08:38 +0200 Subject: [PATCH 8/8] use v2 for internal actions reference --- .github/actions/android-app-setup/action.yml | 2 +- .github/workflows/android_build_alpaka_upload.yml | 4 ++-- .github/workflows/android_build_store_upload.yml | 4 ++-- .github/workflows/android_code_quality.yml | 4 ++-- .github/workflows/android_gradle_task.yml | 2 +- .github/workflows/android_library_artifactory.yml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/android-app-setup/action.yml b/.github/actions/android-app-setup/action.yml index 0ee06c8..ccafb2a 100644 --- a/.github/actions/android-app-setup/action.yml +++ b/.github/actions/android-app-setup/action.yml @@ -42,7 +42,7 @@ runs: using: composite steps: - name: Setup Android environment - uses: UbiqueInnovation/actions-android/.github/actions/android-base-setup@feature/composite-actions + uses: UbiqueInnovation/actions-android/.github/actions/android-base-setup@v2 with: checkout-token: ${{ inputs.checkout-token }} use-git-lfs: ${{ inputs.use-git-lfs }} diff --git a/.github/workflows/android_build_alpaka_upload.yml b/.github/workflows/android_build_alpaka_upload.yml index 13871ed..1ea37e6 100644 --- a/.github/workflows/android_build_alpaka_upload.yml +++ b/.github/workflows/android_build_alpaka_upload.yml @@ -105,7 +105,7 @@ jobs: steps: - name: Setup Android app build environment id: setup - uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@feature/composite-actions + uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@v2 with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} @@ -118,7 +118,7 @@ jobs: env: SSH_KEY: ${{ secrets.SSH_KEY }} if: ${{ env.SSH_KEY != '' }} - uses: UbiqueInnovation/actions-android/.github/actions/ssh-setup@feature/composite-actions + uses: UbiqueInnovation/actions-android/.github/actions/ssh-setup@v2 with: ssh-private-key: ${{ secrets.SSH_KEY }} diff --git a/.github/workflows/android_build_store_upload.yml b/.github/workflows/android_build_store_upload.yml index 4f2a8d7..e730e56 100644 --- a/.github/workflows/android_build_store_upload.yml +++ b/.github/workflows/android_build_store_upload.yml @@ -80,7 +80,7 @@ jobs: steps: - name: Setup Android app build environment id: setup - uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@feature/composite-actions + uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@v2 with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} @@ -135,7 +135,7 @@ jobs: AAB_STAGING_DIR: .tmp/publishing_aab steps: - name: Setup Android environment - uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@feature/composite-actions + uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@v2 with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} diff --git a/.github/workflows/android_code_quality.yml b/.github/workflows/android_code_quality.yml index aeea589..2d221c0 100644 --- a/.github/workflows/android_code_quality.yml +++ b/.github/workflows/android_code_quality.yml @@ -95,7 +95,7 @@ jobs: steps: - name: Setup Android app build environment id: setup - uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@feature/composite-actions + uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@v2 with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} @@ -156,7 +156,7 @@ jobs: steps: - name: Setup Android app build environment id: setup - uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@feature/composite-actions + uses: UbiqueInnovation/actions-android/.github/actions/android-app-setup@v2 with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }} diff --git a/.github/workflows/android_gradle_task.yml b/.github/workflows/android_gradle_task.yml index a645715..d1efdfe 100644 --- a/.github/workflows/android_gradle_task.yml +++ b/.github/workflows/android_gradle_task.yml @@ -65,7 +65,7 @@ jobs: cancel-in-progress: true steps: - name: Setup Android environment - uses: UbiqueInnovation/actions-android/.github/actions/android-base-setup@feature/composite-actions + uses: UbiqueInnovation/actions-android/.github/actions/android-base-setup@v2 with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT || github.token }} use-git-lfs: ${{ inputs.use-git-lfs }} diff --git a/.github/workflows/android_library_artifactory.yml b/.github/workflows/android_library_artifactory.yml index e4a28e5..c1a4422 100644 --- a/.github/workflows/android_library_artifactory.yml +++ b/.github/workflows/android_library_artifactory.yml @@ -61,7 +61,7 @@ jobs: cancel-in-progress: true steps: - name: Setup Android environment - uses: UbiqueInnovation/actions-android/.github/actions/android-base-setup@feature/composite-actions + uses: UbiqueInnovation/actions-android/.github/actions/android-base-setup@v2 with: checkout-token: ${{ secrets.ANDROID_JENKINS_PAT }} use-git-lfs: ${{ inputs.use-git-lfs }}