Merge pull request #487 from dwightjack/renovate/patch-all-minor-patch #2577
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release | |
on: | |
push: | |
paths-ignore: | |
- 'packages/docs/**' | |
- 'README.md' | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
permissions: | |
id-token: write | |
contents: write | |
pull-requests: write | |
env: | |
NPM_CONFIG_PROVENANCE: true | |
jobs: | |
build_and_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- uses: pnpm/action-setup@v2 | |
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # 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@f429536ee076d758a24705203199548125a28ca7 # v9.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 }} |