chore: fix the tests #10
This file contains hidden or 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: Release | |
on: | |
push: | |
branches: | |
- main | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
permissions: | |
contents: write | |
pull-requests: write | |
packages: write | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
registry-url: "https://npm.pkg.github.com" | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9.14.2 | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- name: Setup pnpm cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Run Tests | |
run: pnpm test | |
- name: Build Formatter | |
run: pnpm run build | |
- name: Create Release Pull Request or Publish to GitHub Packages | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm run publish |