diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index 2f7908a..2fc5356 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 "VERSION=$VERSION >> $GITHUB_OUTPUT" - name: Update Coverage Badge - uses: we-cli/coverage-badge-action@main + uses: markusberg/coverage-badge-action@main + with: + version: ${{ steps.get-values.outputs.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)