Skip to content

new codecov configs

new codecov configs #7

Workflow file for this run

name: CD
on:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Setup pnpm
run: npm install -g pnpm
- run: pnpm install
- run: pnpm run ci
- uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Setup pnpm
run: npm install -g pnpm
- run: pnpm install
- run: pnpm run make
- name: Authenticate with npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Post-publish cleanup
run: rm ~/.npmrc
- name: Get version from package.json
run: echo "VERSION=$(node -p require\(\"./package.json\"\).version)" >> $GITHUB_ENV
- name: Create GitHub Release
uses: actions/create-release@v1
with:
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}