version bump (#65) #180
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9.0.4 | |
run_install: false | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: create nvmrc | |
run: sed -n 's/^use-node-version=//p' .npmrc >> .nvmrc | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: "pnpm" | |
- name: nvmrc cleanup | |
run: rm .nvmrc | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm check | |
- uses: browser-actions/setup-chrome@v1 | |
id: chrome | |
- run: pnpm -r test | |
env: | |
PUPPETEER_EXECUTABLE_PATH: ${{ steps.chrome.outputs.chrome-path }} | |
# Ensure docs are up-to-date. | |
- name: docs | |
run: | | |
pnpm run docs | |
if [[ -n $(git status --porcelain) ]]; then | |
echo 'Error: Git status is not clean.'; | |
exit 1; | |
fi | |
- if: github.ref == 'refs/heads/master' | |
run: | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> | |
~/.npmrc | |
- if: github.ref == 'refs/heads/master' | |
name: publish | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
title: version packages | |
commit: version packages | |
version: pnpm ci:version | |
# https://github.com/changesets/action/issues/246 | |
# https://github.com/changesets/changesets/pull/674 | |
publish: pnpm ci:publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |