-
Notifications
You must be signed in to change notification settings - Fork 35
48 lines (45 loc) · 1.55 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build and Release
on:
push:
paths-ignore:
- 'packages/docs/**'
- 'README.md'
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
build_and_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- run: pnpm i
- name: Lint
run: pnpm -r run lint
- name: Test
run: pnpm -r test
- name: Upload code coverage
uses: paambaati/codeclimate-action@4cace242c6e0a2dd554bbb3cc12c58047d8af3e5 # v5.0.0
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
with:
coverageLocations: ${{github.workspace}}/packages/core/coverage/lcov.info:lcov
prefix: test
- name: Build
run: pnpm -r run build
- name: Create Release Pull Request or Publish to npm
id: changesets
if: github.ref_name == 'main'
uses: changesets/action@v1
with:
version: pnpm run ci:version # pnpm changeset version && pnpm install --lockfile-only
publish: pnpm run ci:publish
commit: 'chore: update versions'
title: 'Release: new versions'
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}