add changeste #14
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: CI | |
on: | |
push: | |
branches: | |
- "*" | |
paths-ignore: | |
- "docs/**" | |
pull_request: | |
branches: | |
- "*" | |
paths-ignore: | |
- "docs/**" | |
jobs: | |
tests: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [20] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
- name: Build | |
run: pnpm build | |
- name: Run Tests | |
run: pnpm test | |
deploy: | |
needs: tests | |
runs-on: ubuntu-22.04 | |
if: github.ref == 'refs/heads/v2' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install --no-frozen-lockfile | |
- name: 📣 Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
title: "chore(release): version packages 🦋" | |
publish: pnpm publish:packages | |
version: pnpm version:packages | |
commit: "chore(release): version packages 🦋 [skip ci]" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |