From 5a7b7b6981efd29626b90b9853197ff2ce792ea8 Mon Sep 17 00:00:00 2001 From: andresmr Date: Tue, 12 Dec 2023 18:04:19 +0100 Subject: [PATCH] Read app version --- .github/workflows/continuous-integration.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 5ea3a3c78aa..6cd9fbee9a5 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -33,6 +33,13 @@ jobs: - name: Change wrapper permissions run: chmod +x ./gradlew + - name: Read version name from file + id: read-version + run: echo "::set-output name=vName::$(awk -F' *= *' '/vName/{print $2}' libs.versions.toml)" + + - name: Use version name in the next step + run: echo "Version name is ${{ steps.read-version.outputs.vName }}" + # Run check style - name: Kotlin checkstyle run: ./gradlew ktlintCheck @@ -78,14 +85,9 @@ jobs: - name: Build apk debug project (APK) - ${{ env.main_project_module }} module run: ./gradlew assembleDhisDebug - - name: Install tomlq - run: | - sudo apt-get update - sudo apt-get install -y tomlq - - - name: Read version name from TOML file + - name: Read version name from file id: read-version - run: echo "::set-output name=vName::$(tomlq -r '.versions.vName' libs.versions.toml)" + run: echo "::set-output name=vName::$(awk -F' *= *' '/vName/{print $2}' libs.versions.toml)" - name: Use version name in the next step run: echo "Version name is ${{ steps.read-version.outputs.vName }}"