From 35bd2004c68b4589eb23ff569ccc990490fe9eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20G=C3=B3mez?= Date: Tue, 10 Mar 2026 14:08:42 +0100 Subject: [PATCH] increase version --- .../compute_changed_modules/action.yml | 21 +++++++++ .github/workflows/ci.yml | 2 +- .github/workflows/ci_bump.yml | 38 +++++++++++++--- .github/workflows/ci_publish.yml | 45 ++++++++++++++----- .github/workflows/ci_reports.yml | 1 + libraries/android/version.properties | 2 +- 6 files changed, 88 insertions(+), 21 deletions(-) diff --git a/.github/actions/compute_changed_modules/action.yml b/.github/actions/compute_changed_modules/action.yml index ed2d2c28..cd090df4 100644 --- a/.github/actions/compute_changed_modules/action.yml +++ b/.github/actions/compute_changed_modules/action.yml @@ -1,6 +1,12 @@ name: Compute changed modules description: Detects changed modules and returns matrix JSON +inputs: + modules: + description: "Optional JSON array override" + required: false + default: "" + outputs: value: description: "JSON array of module paths" @@ -15,6 +21,7 @@ runs: steps: - name: Changed files in libraries id: changed + if: ${{ inputs.modules == '' }} uses: tj-actions/changed-files@v45 with: files: | @@ -26,6 +33,20 @@ runs: run: | set -euo pipefail + if [[ -n '${{ inputs.modules }}' ]]; then + modules='${{ inputs.modules }}' + hasModules=$([[ "$modules" == "[]" ]] && echo false || echo true) + + { + echo "value<> "$GITHUB_OUTPUT" + + exit 0 + fi + if [[ "${{ steps.changed.outputs.any_changed }}" != "true" ]]; then { echo "value=[]" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 248e36cb..9ac2bffe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,7 +126,7 @@ jobs: status: name: Status - needs: [checkstyle, build, test] + needs: [ build, test ] runs-on: ubuntu-latest if: always() diff --git a/.github/workflows/ci_bump.yml b/.github/workflows/ci_bump.yml index 5c10b130..26a52681 100644 --- a/.github/workflows/ci_bump.yml +++ b/.github/workflows/ci_bump.yml @@ -50,14 +50,37 @@ jobs: uses: ./.github/actions/info bump: - name: Bump module + name: Bump modules if: ${{ (github.event.inputs.modules || '') != '' }} runs-on: ubuntu-latest + timeout-minutes: 10 - strategy: - max-parallel: 1 - matrix: - module: ${{ fromJson(github.event.inputs.modules) }} + steps: + - name: Check out code + uses: actions/checkout@v6 + with: + fetch-depth: 0 + ssh-key: ${{ secrets.SSH_PRIVATE_KEY }} + persist-credentials: true + + - name: Setup build environment + uses: ./.github/actions/setup + + - name: Bump versions + uses: ./.github/actions/bump_version + with: + version: ${{ github.event.inputs.version }} + modules: ${{ github.event.inputs.modules }} + git-create-tag: ${{ github.event.inputs.create-tag }} + git-branch: ${{ github.ref_name }} + git-user-name: ${{ vars.CI_GIT_USER_NAME }} + git-user-email: ${{ vars.CI_GIT_USER_EMAIL }} + + bump-bom: + name: Bump BOM version + needs: [ bump ] + runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: Check out code @@ -74,7 +97,8 @@ jobs: uses: ./.github/actions/bump_version with: version: ${{ github.event.inputs.version }} - module: ${{ matrix.module }} + modules: '[":bom"]' + git-create-tag: true git-branch: ${{ github.ref_name }} git-user-name: ${{ vars.CI_GIT_USER_NAME }} - git-user-email: ${{ vars.CI_GIT_USER_EMAIL }} + git-user-email: ${{ vars.CI_GIT_USER_EMAIL }} \ No newline at end of file diff --git a/.github/workflows/ci_publish.yml b/.github/workflows/ci_publish.yml index 67d032ed..91a2f1a4 100644 --- a/.github/workflows/ci_publish.yml +++ b/.github/workflows/ci_publish.yml @@ -18,6 +18,11 @@ on: required: false default: '' + bom-module: + description: 'BOM module name (used for version bumping, e.g. ":bom")' + required: false + default: ':bom' + build-type: description: 'Build type (Debug or Release)' required: false @@ -46,6 +51,8 @@ env: BUILD_TYPE: ${{ github.event.inputs.build-type || 'Release' }} # Publishing type for Central Portal (USER_MANAGED or AUTOMATIC) PUBLICATION_TYPE: ${{ github.event.inputs.publication-type || 'AUTOMATIC' }} + # BOM module name (used for version bumping) + BOM_MODULE: ${{ github.event.inputs.bom-module || ':bom' }} # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -80,9 +87,13 @@ jobs: - name: Compute changed modules id: computed uses: ./.github/actions/compute_changed_modules + with: + modules: ${{ github.event.inputs.modules || '' }} checkstyle: name: Check code style + needs: [ computeChangedModules ] + if: ${{ needs.computeChangedModules.outputs.hasModules == 'true' }} runs-on: ubuntu-latest timeout-minutes: 10 @@ -101,8 +112,7 @@ jobs: build: name: Build - needs: [ checkstyle, computeChangedModules ] - if: ${{ needs.computeChangedModules.outputs.hasModules == 'true' }} + needs: [ checkstyle ] runs-on: ubuntu-latest timeout-minutes: 20 @@ -129,8 +139,7 @@ jobs: test: name: Run Unit Tests - needs: [ checkstyle, computeChangedModules ] - if: ${{ needs.computeChangedModules.outputs.hasModules == 'true' }} + needs: [ checkstyle ] runs-on: ubuntu-latest timeout-minutes: 20 @@ -156,9 +165,9 @@ jobs: publish: name: Publish to Central (aggregation) - needs: [ build, test, computeChangedModules ] - if: ${{ needs.computeChangedModules.outputs.hasModules == 'true' }} + needs: [ build, test ] runs-on: ubuntu-latest + timeout-minutes: 20 steps: - name: Checkout repository @@ -168,6 +177,18 @@ jobs: - name: Setup build environment uses: ./.github/actions/setup + - name: Build nmcpProjects + id: nmcp + shell: bash + run: | + set -euo pipefail + + modules='${{ needs.computeChangedModules.outputs.modules }}' + nmcpProjects="$(echo "$modules" | jq -r --arg bom "${{ env.BOM_MODULE }}" '. + [$bom] | join(",")')" + + echo "nmcpProjects=$nmcpProjects" >> "$GITHUB_OUTPUT" + echo "nmcpProjects: $nmcpProjects" + - name: Publish aggregation env: CENTRAL_PORTAL_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }} @@ -178,15 +199,15 @@ jobs: shell: bash run: | ./gradlew publishAggregationToCentralPortal \ - -PnmcpProjects="${{ join(fromJson(needs.computeChangedModules.outputs.modules), ',') }}" \ + -PnmcpProjects="${{ steps.nmcp.outputs.nmcpProjects }}" \ -PpublishingType="${{ env.PUBLICATION_TYPE }}" \ --no-configuration-cache bump: name: Bump version - needs: [ publish, computeChangedModules ] - if: ${{ needs.computeChangedModules.outputs.hasModules == 'true' }} + needs: [ publish ] runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: Check out code @@ -214,9 +235,9 @@ jobs: bump-bom: name: Bump BOM version - needs: [ bump, computeChangedModules ] - if: ${{ needs.computeChangedModules.outputs.hasModules == 'true' }} + needs: [ bump ] runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: Check out code @@ -237,7 +258,7 @@ jobs: uses: ./.github/actions/bump_version with: version: ${{ steps.pr_info.outputs.bump }} - modules: '[":bom"]' + modules: '["${{ env.BOM_MODULE }}"]' git-create-tag: true git-branch: ${{ github.ref_name }} git-user-name: ${{ vars.CI_GIT_USER_NAME }} diff --git a/.github/workflows/ci_reports.yml b/.github/workflows/ci_reports.yml index 8990b4da..1dc4f49c 100644 --- a/.github/workflows/ci_reports.yml +++ b/.github/workflows/ci_reports.yml @@ -68,6 +68,7 @@ jobs: name: Generate reports needs: [ test ] runs-on: ubuntu-latest + timeout-minutes: 10 steps: - name: Checkout repository diff --git a/libraries/android/version.properties b/libraries/android/version.properties index 2f082ddf..335f3a38 100644 --- a/libraries/android/version.properties +++ b/libraries/android/version.properties @@ -2,4 +2,4 @@ MAJOR=5 DEV=0 MINOR=0 -PATCH=29 +PATCH=30