diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba8e4b1..c2f3472 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,12 @@ jobs: with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Read version from package.json + id: package_json + uses: zoexx/github-action-json-file-properties@1.0.4 + with: + file_path: package.json + - uses: actions/setup-node@v3 with: node-version: 18 @@ -36,3 +42,5 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ env.SONARCLOUD_TOKEN }} + with: + args: -Dsonar.projectVersion=${{steps.package_json.outputs.version}} diff --git a/README.md b/README.md index 7b06a46..09dd4c1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Joan of Arc: Orléans Solo Helper +[![Build](https://github.com/brdgm/joan-of-arc-orleans-solo-helper/workflows/Build/badge.svg?branch=develop)](https://github.com/brdgm/joan-of-arc-orleans-solo-helper/actions?query=workflow%3ABuild+branch%3Adevelop) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=brdgm_joan-of-arc-orleans-solo-helper&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=brdgm_joan-of-arc-orleans-solo-helper)