diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 2f7908a..8b26e37 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -22,8 +22,17 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm ci - - run: npm run build --if-present - - run: npm test + - run: npm run build + - run: npm run test + + - name: Get npm version + id: get-values + shell: bash + run: | + VERSION=$(node -p 't=require(`./package.json`).version') + echo "Generating badge version $VERSION >> $GITHUB_OUTPUT" - name: Update Coverage Badge - uses: we-cli/coverage-badge-action@main + uses: markus/coverage-badge-action@main + with: + version: '-${{ steps.get-values.version }}' diff --git a/README.md b/README.md index ecba93e..57dfd93 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # ltpa [![node.js build](https://github.com/markusberg/ltpa/actions/workflows/master.yaml/badge.svg)](https://github.com/markusberg/ltpa/actions/workflows/master.yaml) -[![coverage](https://markusberg.github.io/ltpa/badges/coverage.svg)](https://github.com/markusberg/ltpa/actions) +[![coverage](https://markusberg.github.io/ltpa/badges/coverage-2.0.0-alpha.1.svg)](https://github.com/markusberg/ltpa/actions) [![version](https://img.shields.io/npm/v/ltpa.svg)](https://codecov.io/github/markusberg/ltpa) [![license](https://img.shields.io/github/license/markusberg/ltpa.svg)](https://www.apache.org/licenses/LICENSE-2.0)