Skip to content

fix: report test coverage#5 #30

fix: report test coverage#5

fix: report test coverage#5 #30

Workflow file for this run

name: release
on:
push:
branches: [ master ]
permissions:
id-token: write
contents: write
jobs:
release:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
node-version: [ 20.x ]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- name: Github checkout
uses: actions/checkout@v4
if: matrix.os == 'ubuntu-latest'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- run: npm run lint:check
- run: npm audit --audit-level=critical
- run: npm run test:ci
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
fail_ci_if_error: true
- name: build 🔧
run: npm run build
- name: Generate changelog
uses: jaywcjlove/changelog-generator@main
id: changelog
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build Release
uses: jaywcjlove/create-tag-action@main
id: tag_release
with:
release: true
token: ${{ secrets.GITHUB_TOKEN }}
body: |
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
- name: Publish package on NPM 📦
if: steps.tag_release.outputs.successful == 'true'
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}