Skip to content

Commit

Permalink
Read app version
Browse files Browse the repository at this point in the history
  • Loading branch information
andresmr committed Dec 12, 2023
1 parent ae5d71d commit 5a7b7b6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 }}"
Expand Down

0 comments on commit 5a7b7b6

Please sign in to comment.